Have you ever needed to add a null value to your integer, date & time,decimal or Boolean etc... data types?! I'm sure you may faced this desire before and you had to work around it to submit null value to those value data types. So .Net Framework 2.0 comes out with a great new feature and solution to your problem. It is The Nullable Value Types. Nullable type is constructed from the generic Nullable structure. By having this feature, you can submit null values to you database table field normally, like submitting a null DateTime value to a datetime field in your database table. [More]
In the .Net Framework 1.x most of the collection classes store a data of type "System.Object", so you can store any types of data in the collection object or many types in the same collection object. This makes the addition of new items very easy, but when you need to extract a stored data from the collection you will first need to cast it back to its original data type. This cast had a performance impact especially when you are going to deal with the stored data repeatedly. [More]
C# uses special escape sequences within a string to signify that what follows is to be treated differently. The special character is the backslash \. This character says to treat whatever follows it as though it were part of the string itself. [More]
Details... an anonymous type declaration begins with the new keyword followed by a member-initialzer list in braces {} the compiler generates a new class definition that contains the properties specified in the new member-initializer list all properties of an anonymous type are public and immutable anonymous type properties are read-only (you cannot modify a properties value once the object is created) each properties type is inferred from the values assigned to it the compiler defines a ToString method that returns comma-separated list of property-name = value pairs Equals method compares the properties of two or more anonymous types Examples... //Create a 'person' object using an anonymous type var bob = new { Name = "Bob", Age = 37 }; bob in this case is the anonymous type and the types of the properties are inferred by the value assigned. //display information (note here however that the ToString is not required as a ToString method is automatically defined and is the anonymous type) Console.WriteLine("Bob:" + bob.ToString()); //the ToString() method would output the following Bob: { Name = Bob, Age = 37 } var steve = new { Name = "Steve", Age = 36 }; //the compiler is able to recognize the anonymous type for bob and steve are identical and of the same class by the fact that the properties and types were identical for both bob and steve //the anonymous type also creates an equals method that is capable of comparing all objects of this anonymous type (so name and age properties will be compared) Console.WriteLine(bob.Equals(steve) ? "equal" : "not equal")); The output from the is "not equal".