is there in C# a method for List like resize in c++ for vector

后端 未结 7 1230
無奈伤痛
無奈伤痛 2021-01-03 18:14

When I use resize(int newsize) in C++ for vector, it means that the size of this vector are set to newsize

相关标签:
7条回答
  • 2021-01-03 19:11

    Setting List<T>.Capacity is like using std::vector<T>.reserve(..). Maybe List<T>.AddRange(..) fit your needs.

    0 讨论(0)
提交回复
热议问题