String Builder vs Lists

前端 未结 5 1940
野的像风
野的像风 2021-01-17 01:19

I am reading in multiple files in with millions of lines and I am creating a list of all line numbers that have a specific issue. For example if a specific field is left bla

5条回答
  •  旧巷少年郎
    2021-01-17 01:32

    As others have pointed out, I would probably use StringBuilder. The List may have to resize many times; the new implementation of StringBuilder does not have to resize.

提交回复
热议问题