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.

Sunday 23 July 2017

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

Constructor(Basic member of class):

Constructors is a special type of functions. Constructor class k tamam functions me sab se top pe likha jaye hai. Constructor ka naam aur class ka naam same hona chahiye. Constructor ki return data type nahi hoti matlab yeh k constructor kuch bhi return nahi kre ga to is liye constructor k saath na to hum koi return data type likhtey hain aur na hi void ka keyword likhtey hain. Sirf constructor k saath us ka access modifier likhtey hain.



Constructor ki aik khaas property yeh bhi hai k jab hum constructor nahi bnatey to aik default constructor program me tab bhi mojood hota hai. Yeh kesey pata chaley ga k is program ki class ka default constructor hai? Woh is tarha k jab aap class ka object bna rhey hongey to new k keyword k baad jo aap ne class ka naam likha hoga us pe mouse hover kre to .NET Framework intellisense aap ko bta de ga k className.constructor(). Class ka object bnatey waqt constructor sirf aik dafa call hoga. Constructor ka kaam hota hai to initialize. Agar hum apna constructor bnaye ge to humara bnaya hua constructor hi call hoga jab k default constructor call nahi hoga.



Memory me jab aap koi object initialize kr rhey hotey hain to operating system se humara constructor request krta hai k is object ko memory allocate ki jaye ya memory me jaga di jaye. Constructor on the behalf of CLR, operating system se request krta hai k merey object ko memory allocate ki jaye(jitney us class k members space occupy kre ge utney size ki memory allocate hogi).

Saturday 22 July 2017

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

Agar 2 functions same name k same class me hain lakin in k signatures different hain to isey hum function overloading ya method overloading kehtey hain. Function overloading ka taluq uski implementation, access modifier, return data type se nahi hoga balkey function overloading ka taluq us k naam aur signature se hoga. Agar function ka naam same hoga aur signature different hoga tb function overloading hogi. Function signature me arrangement of arguments ka matlab yeh hai k arguments ki data type ka arrangement change kr den.





Agar aik naam k two functions hain aur in dono functions k signature ka arrangement change hai.


FOR EXAMPLE:

Public long Add(int i, short j){......}            //first function


Public long Add(short i, int j){......}            //second function



Jab hum class se bahr in dono me se kisi aik function ko call kerwaye ge to is function k kisi aik argument k saath us ki type casting kre ge jis se identify hoga k hum kon sa function call krwa rhey hain. Agar hum type casting nahi kre ge to compile-time error aa jaye ga.


FOR EXAMPLE:

obj.Add(1, (short)1);            //call first function



Agar function ko call krwatey waqt function me koi parameter number without type casting pass krwaye ge to woh by-default integer hoga.


FOR EXAMPLE:

Public long Add(int i, int j){......}                 //first function



Public long Add(int i, short j){......}            //second function


obj.Add(1, 1);                                              //call first function


obj.Add(1, (short)1);                                  //call first function

Friday 21 July 2017

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

Functions Signature:

For Example: Kya aik ghar me aik hi naam k 2 log ho saktey hain? jawab hai g haan bilkul ho saktey hain lakin woh is condition me k jab aap k ghar me aap k sath koi doosri family bhi reh rhi ho. Aik choti si Misaal de k main aap ko samjhane ki koshish krta hn k farz kren k maine apna ghar kisi ko rent pe diya hua aur jis ko maine apna ghar rent pe diya hai us ka aur mera naam same hai i.e. "SHUMAIL". Ab mere ghar koi shaks ata hai aur woh kehta hai k "SHUMAIL" ko bula do to mere ghar walo ko kesey pta chaley ga k woh shaks kis "SHUMAIL" ki baat kr rha hai? Woh aese pta chaley ga k us shaks ko "SHUMAIL" k naam k sath kuch makhsoos parameter provide krna pre ga like: "SHUMAIL Software house wala" ya phir "SHUMAIL Textile wala" etc to tb ja k mere ghar walo ko pta chaley ga k woh shaks kis "SHUMAIL" ko bula rha hai kyun k "There is an ambiguous reference between 2 SHUMAIL's". Bilkul is tarha ".NET Framework" me aik class k ander aik naam k 2 functions ho saktey hain lakin in dono functions k parameters change hon  ge. Function me hum jo parameter pass krwatey hain unhey hum signature ya phir function signature kehtey hain.




Functions Signature me 3 cheezey shamil hoti hain.


  1. Number of arguments/parameters.
  2. Type of arguments/parameters.
  3. Arrangement of arguments/parameters.

Hum Number of arguments/parameters, Type of arguments/parameters aur arrangement of arguments/parameters ko change kr den to humara function signature bhi change ho jaye ga. Function ko hum us k signature se pehchane ge. Function signature me agar number of argument, type of argument ya arrangement of argument me se koi aik cheez bhi change ker den ge to function signature change ho jaye ga.

Thursday 20 July 2017

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

Jab hum apne program me data ko validate kr rhey hon ge ya phir data pe koi check lga rhey hongey to isey hum "Business logic" kahen ge. For Example: if(weight > 0){..........}



Agar instance variable jisey hum apne program ki kisi property(get & set) me use kr rhey hon ge to best practice yeh hai k according to requirement hum is instance variable ka access modifier private rakhey kyun k hum property me use values ko check lga k safe kr saktey hain lakin instance variable ki value ko safe nahi kr saktey matlab yeh k agar instance variable ka access modifier public hoga to koi bhi class k bahr se is instance variable ko access kr sakta hai aur is ki value change bhi kr sakta hai.



Wednesday 19 July 2017

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

Agar variable humney function, constructor ya property(get & set) k ander declare kiya hoga to woh "local variable" kehlaye ga.



Agar kisi function me 2 integers add ho k return hon ge to hum us function ki return data type "long" rakhey ge kyun k aik achey programmer ki nishani hai k woh apne program ko hr aspect se soch rha hota hai. Agar misaal k tor pe yeh dono integers add ho k aesi value return kren jo integer data type ki maximum value se bari ho to us k liye humey integer se bari data type rakhni hogi i.e. "long data type".



Visual Studio me Intellisense ka matlab hai number of features(list members, parameter info, quick info & complete word).



Agar humney aik variable declare kiya hai jis ka scope "if statement" ya phir "loop" ki "curly brackets{}" k dermiyan me hai to yeh variable humey is "if statement" ya "loop" se bahr available nahi hoga.



"local variables" ka scope limited hota hai jis ki wajah se hum "local variables" k sath access modifiers use nahi krtey.

Sunday 7 May 2017

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

Jab koi entity jisey hum class ki surat me bna rhey hongey, woh "abstract data type" kehlaye gi lakin agar yehi entity hum database me bna rhey hon ge to yeh "table" kehlaye ga.



Abstract data type is basically a collection of homogeneous attributes and behaviors. Homogeneous ka matlab hai k aik hi type ki ya aik hi tarha ki koi cheez. FOR EXAMPLE: Agar student ka behavior hai "to study(perhna)" to yeh behavior teacher ka nahi ho sakta aur agar teacher ka behavior "perhana" hai to yeh behavior student ka nahi ho sakta, Is ka matlab yeh hua k students se related jitne bhi behaviors hain woh student ki class me honge aur teacher se related jitne bhi behaviors hain woh teacher ki class me honge.



Basic members of class(abstract data type) ko agar hum classify kre to hum yeh keh saktey hain k is me humare pass "data members" aur "function members" hotey hain. Data members me humare pass variables hotey hain jab k function members me humare pass properties, functions aur constructors hotey hain.



Agar hum user se input le k koi operation perform krtey hain to is k liye hum Console.ReadLine() ka function use krtey hain. Console.ReadLine() ka function humey string data type me output de ga aur phir hum data type ko change krne k liye "Type casting" kren ge. Agar hum user se integer value input me le k us ko print krwana chahtey hain to Console.ReadLine() ka funnction is input value ko integer data type me nahi balkey string data type me apney pass hold kre ga, to hum string ko integer data type me convert krne k liye type casting kren ge.

Saturday 29 April 2017

Lecture#2 ka Point#75 (Csharp Roman Hindi/Urdu Me).

FUNCTION(BASIC MEMBER OF CLASS):

Function is a set of instructions. Program likhtey waqt kuch cheezey aesi hoti hain jinhey hum bar bar repeat kr rhey hotey hain to woh set of instructions jinhey hum bar bar repeat kr rhey hotey hain unhey hum function me convert kr letey hain.



Function bnaney ka maqsad code ko re-use krna hai.



Humara function alag hota hai aur humara program alag hota hai. Hum function ko apne program me call krtey hain. Humare program ka control jump kr jata hai us function pe jisey humney apne program me call krwaya hai aur woh pura function execute hota hai aur function execution jb khattum hoti hai to control wapis transfer ho jata hai program ki us line k very next jahan humney woh function call krwaya hoga.



Function ka koi "access modifier" hoga, koi "name" hoga aur kuch "attributes" & "properties" hongi. Function ko hum Sub-routine ya method ya procedure bhi kehtey hain.



Aik function woh hai jo aap se kuch input le aur us input ko process krne k baad kuch value return kre. Aik function woh hai jo koi value return nahi krta. Jo function value return kre ga hum us k sath uski return data type bhi mention kre ge.


FOR EXAMPLE: Public long Add(int i, int j){ return i+j; }



Jo function value return nahi krta us k sath hum void ka keyword likhtey hain. void ka matlab hota hai "no return data type".
FOR EXAMPLE: Public void Print(){ Console.WriteLine("Muhammad Shumail Cheema"); }



Jo variable hum function k scope ya "curly brackets{}" k ander likhen ge woh humara "local variable" kehlaye ga. "Local variable" ka scope function se bahir nahi hoga.



"Local variables" apni data type ki default value se initialize nahi hotey. Sirf "instance variables" apni data type ki default value se initialize hotey hain.

Friday 28 April 2017

Lecture#2 ka Point#74 (Csharp Roman Hindi/Urdu Me).

Agar humare Student k card me "Name", "Roll#", "Course", "Class" aur "Phone#" ki total 5 fields hain to is ko mad-e-nazar rakhtey huvey humare program me 5 variables alag baney ge aur 5 properties alag baney gi(i.e. 5 gets aur 5 sets bhi bney ge).



Agar hum "property" likhtey waqt "get" likhen lakin "set" ka block code na likhen to isey hum "Read-only property" kehtey hain.


FOR EXAMPLE:
Public int RollNo
{
get
{
return rollno;
}
}

"Read-only property" me value assign nahi kr saktey iska matlab yeh hua k value constant rhey gi aur value change nahi hogi.



Agar hum "property" likhtey waqt "set" likhen lakin "get" ka block code na likhen to isey hum "Write-only property" kehtey hain.


FOR EXAMPLE:
Public int RollNo
{
set
{
rollno = value;
}
}

"Write-only property" me hum sirf property k through variable ko value assign kr saktey hain.



Agar hum "property" likhtey waqt na "get" ka block code likhen aur na hi "set" ka block code likhen to yeh "property" hi nahi rhey gi. "Property" bnaney k liye kam se kam aik "accessor(get ya set)" hona lazmi hai.

FOR EXAMPLE:
Public int RollNo
{
}

Agar hum "property" likhtey waqt "get" bhi likhen aur "set" bhi likhen to isey hum "Both property" kahen ge.


"VB.NET" me humey "property" k saath likhna hota hai k yeh "Read-only property" hai ya "Write-only property" hai ya phir "Both property" hai.

Thursday 27 April 2017

Lecture#2 ka Point#73 (Csharp Roman Hindi/Urdu Me).

Property ko hum "get" aur "set" krwa rhey hotey hain. Property ko hum "accessor" bhi kehtey hain("get accessor" ya "set accessor").




Program likhtey waqt proper name convension honi chahiye. Jesey mera naam "Muhammad Shumail Cheema" hai to "Muhammad" mera first name, "Shumail" mera middle name aur "Cheema" mera last name hoga. yeh mera proper naam hai. aesa nahi hoga k mera naam "Shumail123" ho ya phir "Shumail_@" ho. is cheez ko hum proper name convension kehtey hain. Bilkul isi tarha jab developer program bnaye ga to woh apne variables, properties aur functions k naam proper rakhey ga.




Mera naam "Muhammad Shumail Cheema" hai to "Muhammad" ka "M", "Shumail" ka "S" aur "Cheema" ka "C" capital hoga. isey hum "Casing" kehtey hain. Developers ko bhi chahiye k jab woh program likh rhey hon to apne variables, properties aur functions k naam casing k saath likhain. "Muhammad Shumail Cheema" k naam me "pascal casing" use hui hai aur "muhammad Shumail" k naam me "camel casing" use hui hai.



Agar koi code ko dekh k bta de k is ka output kya aye ga to isey hum "Dry Run" kehtey hain. is ka matlab yeh hua k aap apney dimagh ko as a compiler use krtey huvey dimagh me program ka sketch bnao ge aur is ko mad-e-nazar rakhtey huvey program ka output btao ge.



Jab hum project bna k usey compile aur run krwatey hain to yeh aik "Cost" hai. Program ko build krna, Program ko compile krna aur program ko release krna that is a "Cost".



"Dry Run" ko hum "Unit testing" bhi kehtey hain.

Wednesday 26 April 2017

Lecture#2 ka Point#72 (Csharp Roman Hindi/Urdu Me).

byte, short, integer aur long data type ki by-default value "0" hogi (for signed and unsigned data types). boolean data type ki default value "False" hogi. "char" aur "string" data type ki default value "empty" hogi. "decimal", "float" aur "double" ki default value "0" hogi.


Agar boolean ki 8bits me se 7bits "0" ya "OFF" hain aur 1bit "1" ya "ON" hai to answer "TRUE" aye ga kyun k in tamam 8bits me se 1bit "ON" ya "1" hai.


"NULL" ko hum special data type bhi kehtey hain.


"Heap" and "Stack" is basically a type of memory.


PROPERTIES (BASIC MEMBER OF CLASS):  


Purani languages me class me properties ka concept nahi hota tha. Properties hum use krtey hain to "get" and "set" a value "To/From" the variable.


Error humare pass 3 types k hotey hain.


  1. Compile time error.
  2. Runtime error.
  3. Logical error.




"Logical error" woh error hota hai jo input ki wajah se ata hai. FOR EXAMPLE: Jesey k student ka Roll# hai woh hamesha "positive" me hoga lakin agar user "negative" me input dega to woh logical error kehlaye ga. Logical errors ko control krne k liye hum program me kuch modifications kre ge aur properties bnaye ge.


Syntax of property
Public int RollNo{.....} → Property
Public int RollNo; → variable

Purani languages me hum variable me value "set" aur "get" krne k liye hum functions bnatey thay. FOR EXAMPLE: getRollNo() aur setRollNo(). Lakin .NET Framework me values ko "get" aur "set" krwane k liye hum propertties bnatey hain.
Line No. Code Comments
1 class Student
2  {
3  Public int rollno; //instance variable or data member.
4  Public int RollNo //property or function member.
5   {
6   get
7    {
8    return rollno;
9    }
10   set
11    {
12    rollno = value; //"value" is a keyword. jo value RollNo ki set kre ga woh value hi is "value" ke keyword me aye gi.
13    }
14   }
15  }
16 class Program
17  {
18  static void Main(string[] args)
19   {
20   Student Haroon = new Student();
21   Haroon.RollNo = 4945; //to set the property "RollNo"
22   Console.WriteLine(Haroon.RollNo); //to get the property "RollNo"
23   Console.ReadLine();
24   }
25  }
OUTPUT:                  4945

Tuesday 25 April 2017

Lecture#2 ka Point#71 (Csharp Roman Hindi/Urdu Me).

Jo cheez "curly brackets{}" k dermiyan mojood hogi to yeh is cheez ka scope kehlaye ga.



Agar kisi variable ka scope class k kisi function ya constructor me define na ho ya class k ander root pe hi varriable define ho to woh humare pass "Instance variable" kehlaye ga.




Variable declarationStudent Haroon;


Variable initializationStudent Haroon = new Student();

Instance variable ko hum class-level variable bhi kehtey hain.


Student Haroon = new Student(); me Haroon naam ka variable memory me declare ya define ho jata hai jis ki data type ya class Student hai lakin yeh variable memory me tb tak exists nahi kre ga jab tak hum is variable ko new k keyword k sath initialize na krwa le.



.NET Framework me hum jab bhi koi program bna rhey hongey to aik "memory pool area" hoga jo humare program k liye reserve ho jaye ga aur jitne bhi instances ya objects hongey memory me woh is "memory pool area" me initialize hongey.



Program ka "memory pool area" alag hota hai aur variables ka "memory pool area" alag hota hai.



C#(C sharp) me agar hum kisi cheez k sath access modifier nahi likhtey to woh cheez by-default "Private" hogi jab k VB.NET me agar hum kisi cheez k sath access modifier nahi likhtey to woh cheez by-default "Public" hogi.



VB.NET is slightly "loosly coupled system".



Agar humney apne instance variable ko declare to kiya lakin initialize nahi kiya to by-default woh instance variable apni default value se initialize ho jaye ga. FOR EXAMPLE: byte b; me "b" instance variable hai aur is ki data type "byte" hai aur "byte" data type ki default value "0" hai to is ka matlab yeh hua k byte b = 0; .



Hr data type k by-default tamam bits us waqt tk "OFF" ya "0" hotey hain jab tk us data type ka variable initialize nahi ho jata.

Monday 24 April 2017

Lecture#2 ka Point#70 (Csharp Roman Hindi/Urdu Me).

BASIC MEMBERS OF ABSTRACT DATA TYPE(ABSTRACT CLASS):-

  1. Variables.
  2. Properties.
  3. Functions(Methods/Procedures/Sub-Routines).
  4. Constructor.

Basic members of class me Variable ko hum "data member" bhi kehtey hain. Data member ka matlab aesi cheez jo memory k andar data ko hold kre ya hum aasan alfaz me yeh bhi keh saktey hain k variable aik aesi cheez hai jis me humara data store hota hai.



Basic members of class me Properties, Functions aur Constructor yeh sab class k behaviors hain.


For Example
byte b = 100 ;


byte   →   Data type.
b    →   Variable ya placeholder.
=    →   Assignment Operator.
100   →   Data.
;    →   Line terminator.


Variable data ko represent krta hai with data type. Variable humare pass placeholder hai jahan hum memory k andar data ko store kertey hain. Yeh placeholder kisi data type ko represent krta hai aur jis datatype ko represent krta hai isi type ka data is placeholder me store hoga is k ilawa kisi doosri type ka data is placeholder me store nahi hoga. To hum yeh bhi keh saktey hain k humare pass variable specific data type k honge.



FOR EXAMPLE: Variable ya to byte data type ka hoga ya phir short data type ka hoga ya kisi bhi data type ka hoga lakin aesa bilkul bhi nahi hoga k yeh variable short data type ka bhi ho aur byte data type ka bhi ho kyun k yeh variable kisi aik (specific) data type ko represent kre ga ya hum yeh bhi keh saktey hain k is variable ki aik (specific) data type k data ko apney andar store kre ga.



Variable ne temporary ya kuch time k liye data ko memory me hold kiya hoga aur jesey hi hum apna program close kren ge to yeh variable memory se flush out ho jaye ga.



Variables humare pass 2 types k hotey hain.

  1. Instance Variable.
  2. Local Variable.

Sunday 23 April 2017

Lecture#2 ka Point#69 (Csharp Roman Hindi/Urdu Me).

Jab hum class ki baat kren ge to humare pass "Access modifiers" honge jis ki madad se hum limitations define kr saktey hain.



"Public (access modifier)" ka matlab hai k jo cheez publically available ho aur "Private (access modifier)" ka matlab hai k jo cheez makhsoos(private) logo ko available ho.



For example: ab aik teacher hai woh student ki class conduct kr rha hai. Us class me multimedia(projector) lga hua hai jo teacher k laptop se connected hai. To multimedia(projector) ka access modifier "public" hoga kyun k projector ko teacher aur student dono dekh saktey hain jab k teacher k laptop ka access modifier "private" hoga kyun k laptop ko sirf teacher hi dekh sakta hai.



"Public" aur "private" access modifiers ko hum "Basic access modifier" bhi kehtey hain.



"Protected" aur "friendly" bhi humare pass access modifiers hain jinhey hum "advance access modifier" bhi kehtey hain.



For example: aik class hai jis me teacher students ki class conduct kr rha hai. Us class me projector hai jo laptop se connect hai. Ab projector class me mojood tamam logo k liye "public"  access modifier hai jab k class se bahr mojood tamam logo k liye "private" access modifier hai.



Class me mojood kisi bhi cheez ka access modifier agar "private" hoga to is class ki koi bhi cheez humey is class se bahir available nahi hogi. Lakin agar is class ki kisi bhi cheez ka access modifier "public" hoga to woh class k bahir bhi available hogi.



Example: Ab jesey student k card pe student ka name, roll#,course etc likha hua hota hai lakin fees nahi likhi hui hoti kyun k fees ka access modifier "private" hai.