I was reading this article.
Split String in C#
Question is, when I call Split method, does it adds more overhead (variables) in the memory?
C# String Split
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 20, 2011, 12:13 PM EDT
String.Split() simply produces an array of sub-strings. So it does add more objects to the heap but this is unavoidable.
Suthish NairRank #92 · 22.8K reputationPosted Mar 20, 2011, 12:13 PM EDT
VulpesRank #55 · 29.2K reputationPosted Mar 20, 2011, 12:28 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Mar 20, 2011, 6:55 PM EDT