2010-08-24 50 views

回答

0

您可以使用var关键字来推断对象的类型。

例如:

//without using the "var" keyword 
Dictionary<List<string>,int> myCustomDictionary = new Dictionary<List<string>, int>(); 

//with the "var" keyword 
var myCustomDictionary = new Dictionary<List<string>, int>(); 

哪个更容易阅读? :)