Why does this generic method require T to have a public, parameterless constructor?

前端 未结 5 769
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 01:09
public void Getrecords(ref IList iList,T dataItem) 
{ 
  iList = Populate.GetList() // GetListis defined as GetList
}

data

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 01:57

    Getrecords ...
    

    This should have any more detailed information that you need. http://msdn.microsoft.com/en-us/library/twcad0zb(VS.80).aspx

提交回复
热议问题