C# 3.0 (Awesome)

Download C# 3.0 Specs     Download Video

Implicit type casting on complie time by declaring and initializing variable by following statement………… var adnan = 3; or var adnan=”aman” var adnanArray = new []{1,2};

Extension Method are instance method and alike static methods but good thing is they can b embedable in any class without touching the code of that class or even after its compilation 😉 means you can add method to System.Object class which would be accessible by its inherted class

Object and Collection Initializer to initialize and declare object or collection 😉

var adnan = new ClassName{age=23, post=’Software engineer’};

var adnan = new list<ClassName>{new ClassName{age=21, post=’engineer’}, new ClassName{age=23, post=’Softwareengineer’}};

Anonymous Types declare a type by just using it 😛

var adnan = new {age=23, job=”internee”} ;

Query Expression (fav) works on data collection (db,xml,file,object,collection) just like in query format but not exactly as sql query 😉

var adnanAman = from c in db.Customers where c.customerName = “adnan” select c;


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s