Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Thursday, December 24, 2009

From msdn.

        // i is compiled as an int
        var i = 5;
 
        // s is compiled as a string
        var s = "Hello";
 
        // a is compiled as int[]
        var a = new[] { 0, 1, 2 };
 
        // person is compiled as an anonymous type
        var person = new { Name = "Terry", Age = 34 }; 
Anonymous types:
 
var v = new { Amount = 108, Message = "Hello" };

Anonymous types provide a convenient way to encapsulate a set of read-only properties into a single object without having to first explicitly define a type

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview