Convert IList to array in C#

前端 未结 4 1960
后悔当初
后悔当初 2021-01-08 00:24

I want to convert IList to array: Please see my code:

IList list = new ArrayList();
list.Add(1);
Array array = new Array[list.Count];
list.CopyTo(array, 0);
         


        
4条回答
提交回复
热议问题