C#4語法

在C# 4.0中能夠經過委託某個成員的實現來實現一個接口,例以下面的代碼:接口

public class Foo : IListstring

{  io

  private List _Collection implements IList;class

    public Foo()  object

  {    List

    _Collection = new List();  im

  }new

}

 

元組:

var list = new List<Tuple<int, string, object>>(){ Tuple.Create(1, "a", new object()), Tuple.Create(2, "b", new object()),}; 

相關文章
相關標籤/搜索