Showing posts with label hindi. Show all posts
Showing posts with label hindi. Show all posts

Saturday, 29 July 2017

Lecture#4 ka Point#87 (Csharp Roman Hindi/Urdu Me).

Inheritance means 'warasat' hai. Aesi cheezey jo parent to child(top to bottom) muntakil hoti hain unhey inheritance kehtey hain. Jo child apne parent ki cheezon  ko use kr rha hai woh inheritance kehlati hai.


OOP(Object-oriented programming) ko agar aik word me define krna ho to woh hai reuseability. Reuseability inheritance ki wajah se hi possible hoti hai. Agar inheritance na hoti to child apne parent ki cheezo ko reuse nahi kr sakta. Inheritance me child apni parent ki cheezo ko 'As it is' use kr sakta hai ya modify kr k bhi use kr sakta hai.


Agar mere parent k pass car hai to agar mere parent mujhe allow kre ge to yeh car main bhi use krun ga na k parosiyon ka bacha is car ko use kre ga kyun k mere parent k saath main inherited hn, parosiyon ka bacha nahi.


Inheritance me parent ki common cheezey child use kr sakta hai, jesey aik ghar hai parent k naam pe jis me us k child bhi rehtey hain. Inheritance me common cheezey parent k pass hoti hain jab k uncommon cheezey child k pass hoti hain.

Friday, 28 July 2017

Lecture#4 ka Point#86 (Csharp Roman Hindi/Urdu Me).

VB.NET me agar hum return type function ki return statement nahi mention krte ya kuch bhi return nahi krwatey to by-default VB.NET ka compiler aik 'NEW OBJECT' return krwaye ga, is ka matlab yeh hua k memory me aik 'NEW OBJECT' create hoga aur woh return ho jaye ga aur yeh object empty hoga, yeh cheez VB.NET me 'Runtime error' kehlaye gi jab k C# me yeh cheez 'Compile-time error' k tor pe show hogi. Yehi wajah hai k VB.NET 'Loosly coupled language' hai aur C# 'Tightly coupled language' hai.




Example Code of VB.NET (Module1.vb)
1 Module
2 Sub Main()
3 Console.Write(Add(1,1))
4 Console.ReadLine()
5 End Sub
6 Function Add(i AS Integer, j AS Integer) AS Long
7 Return i+j
8 End Function
9 End Module

Thursday, 27 July 2017

Lecture#4 ka Point#85 (Csharp Roman Hindi/Urdu Me).

Compiler hamesha output 'true or false', ya 'sahi ya ghalat', ya '0 or 1' ki form me hi dega. Aesa nahi hoga k compiler humey in dono ki koi dermiyani value output return kre, is ka matlab yeh hua k compiler humey 'absolute value' dega like: '0 or 1', 'true or false' etc.



C# me function aik waqt me hamesha aik hi value return kre ga, aik se zyada value nahi return kre ga. C++ me hum function se aik waqt me aik se zyada values return krwa saktey hain with the help of 'reference call' ya 'pointer'.



.NET framework me 'pointer' ka concept nahi hai. Agar hum VB.NET ya C# me kisi function se aik se zyada values return krwana chatey hain to us k liye humey 'Array' use krna parey ga.



VB.NET is 'highly managed' code, matlab yeh k no pointer, no reference, no forget pointer, no out, no in etc. C# me hum 'managed' aur 'unmanaged' dono type k program likh saktey hain. 'unmanaged' code me hum 'pointer' wagera use kr saktey hain, aur 'unmanaged' code ki zimedari .NET ka CLR ya .NET ka framework nahi leta.

Wednesday, 26 July 2017

Lecture#4 ka Point#84 (Csharp Roman Hindi/Urdu Me).

VB.NET 'loosly coupled language' hai aur C# 'tightly coupled language' hai. C# me no return type function me hum void ka keyword use krte hain jab k VB.NET me no return type function k saath hum sub ka keyword use krte hain. Agar hum C# me function ki return type likhtey hain lakin is function me return ki statement ya return keyword nahi likhtey to code compile nahi hota, is ka matlab yeh hua k jab humney function k saath is ki return type mention krdi to return ki statement ya keyword mendatory ho jaye ga jab k VB.NET me function ki return type mention krte hain lakin is function me return ki statement ya keyword nahi likhtey to code compile ho jaye ga aur is function ka output woh hoga jo is function ki return data type ki default value hogi, is ka matlab yeh hua k VB.NET 'loosly coupled language' hai. VB.NET me return type function k saath hum 'Function' ka keyword use kren ge jab k no return type function k saath hum 'Sub' ka keyword use kren ge, Sub ka matlab sub-routine hai aur sub-routine se muraad aesi functionality jo kuch return na kr rhi ho. Agar hum VB.NET me Function ka keyword use krtey huvey aik function bnatey hain lakin is function ki return data type mention nahi krte aur na hi is function me return ka keyword likhtey hain tab bhi humara code run ho jata hai. Agar hum VB.NET me function ka keyword use krtey huvey function bnatey hain aur return data type mention nahi krte to VB.NET ka compiler is function ko khud se default return data type assign kr de ga jo k 'Object' hogi. VB.NET me 'Object' aik aesi data type hai jo k 'apply for all' hai, aur 'apply for all' ka matlab hai k is me tamam data types mojood hongi jesey k string, long, integer, short, byte etc. VB6 me default return data type 'Variant' hai jo k 'apply for all' hai. C# me margin boht kam hota hai jab k VB.NET me margin boht zyada hota hai, is ka matlab yeh hua k VB.NET me jesey hum return type function me return data type aur return ka keyword mention nahi kr rhey hotey to VB.NET ka compiler us ki jagah function ki by-default data type aur by-default value return krwa rha hota hai, jis ki wajah se VB.NET me humey humara desired output nahi milta.

Tuesday, 25 July 2017

Lecture#3 ka Point#83 (Csharp Roman Hindi/Urdu Me).

Jitni bhi primitive data types hain, they are structures. Structures aik aur tarika kaar hai data types ko represent krne ka.



Class aik tarika kaar hai data type bnaney ka. Classes k instances Heap me jatey hain. Heap is basically large memory pool area.



Structures k instances woh Stack me jatey hain. Stack is basically small memory pool area.



Stack pe FIFO method hota hai jab k Heap pe memory Traverse hoti hai.



Classes Heap pe jati hain isi liye hum classes k instances ko new k keyword se initialize krtey hain.



Stack pe humey memory space allocate krwane ki zaroorat nahi hai kyun k motherboard k upper jo register hain that is Stack.



Aik hi program k andar hum aik naam k 2 instances ya objects nahi bna saktey.



Aik hi naam k aik se zyada constructors with different signatures aur hi class me hon to isey hum constructor overloading kahen ge. Constructor overloading bilkul function overloading ki tarha hogi.




Example
class Arithmetic{
Public Arithmetic(){
height = 1;
}
Public Arithmetic(int height){ //parameter height is a local variable
this.height = height; //this.height is an instance variable & height is a local variable
}
private int height; //height is an instance variable
}

Monday, 24 July 2017

Lecture#3 ka Point#82 (Csharp Roman Hindi/Urdu Me).

Class k instance variable ko jab declare krte hain to woh khud hi apni data type ki default value se initialize ho jata hai aur is instance variable ko is ki data type ki default value se is class ka default constructor ya constructor initialize krwata hai. Humey class k instance variables ki koi khud se value set krwani ho to usey hum constructor me initialize kre ge aur jesey hi humari class ka object initialize hoga to constructor call ho jaye ga aur instance variable ki value set ho jaye gi. Constructor values set kr rha hota hai aur values return nahi krta, values set krne me aur values return krne me farq hai. Constructor me hum woh kaam krte hain jo hum chahtey hain k jesey humara object initialize ho to woh call ho jaye.



FOR EXAMPLE: Jab koi insaan peda hota hai to us ki kuch values default me set hoti hain like; eyes ka color, hairs ka color, skin ka color etc to in properties ya values ko hum us insaan k constructor me initialize krwa den ge aur kuch properties ya values us insaan ki pehley se set nahi hongi like; naam etc to naam ki property hum khud set kren ge aur usey constructor me call nahi krwaye ge.



Constructor ka kaam hi properties me values set krna hota hai.