LIST<> AddRange throwing ArgumentException

后端 未结 2 1609
伪装坚强ぢ
伪装坚强ぢ 2021-02-14 18:33

I have a particular method that is occasionally crashing with an ArgumentException:

Destination array was not long enough. Check destIndex and length, and the ar         


        
2条回答
  •  青春惊慌失措
    2021-02-14 18:53

    Honestly, I'm not sure, but why not just remove the size declaration on your List initialization?

    List`` list = new List``
    

提交回复
热议问题