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

后端 未结 7 1342
無奈伤痛
無奈伤痛 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.Capacity is like using std::vector.reserve(..). Maybe List.AddRange(..) fit your needs.

提交回复
热议问题