Why does adding primitive struct to a List not require the new keyword. Whereas adding non-primitive struct to List require the new keyword? - C#

后端 未结 0 1302
暖寄归人
暖寄归人 2020-12-25 11:40

Adding primitive struct (eg. int) to a List:

int i=10;
List list=new List();
list.Add(i);
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题