What is the best way to clear an array of strings?

后端 未结 7 1379
被撕碎了的回忆
被撕碎了的回忆 2021-02-19 02:13

What is the best way to clear an array of strings?

相关标签:
7条回答
  • 2021-02-19 03:08

    Depending what you want:

    • Assign Nothing (null)
    • Assign a new (empty) array
    • Array.Clear

    Last is likely to be slowest, but only option if you don't want a new array.

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