C# (Second Day)
C# (Second Day)
Namespace
Classes, Structure, Enumerators
Field, Methods, Indexeres, Delegates
Examples
System namesapace
Console class
Write() method
Importing namespaces
string
object
Difference between in value type and reference type
Value types are stored in stack and reference in heap
Value types can never have null value assigned
View contents of a exe file or MSIL code
if
switch
ternary operator (?:)
Shortcut of if-else
Condition?true part:false part;
Loops
while loop
do-while loop
for loop
foreach loop – works with arrays and collections
Class and Object
Read/Write properties
Having set and get
Read Only properties
Having only get
Write Only properties
Having only set
Passing arguments to the methods
Encapsulation