Maybe you are finding 

Anonymous Types (C# Programming Guide)

https://msdn.microsoft.com/en-us/library/bb397696.aspx

 

var v = new { Amount = 108, Message = "Hello" };  
  
// Rest the mouse pointer over v.Amount and v.Message in the following  
// statement to verify that their inferred types are int and string.  
Console.WriteLine(v.Amount + v.Message);  

 

arrow
arrow
    全站熱搜

    olivermode 發表在 痞客邦 留言(0) 人氣()