MTSkull
Centurion
Just wondering which (if any) might be better? Since there are at least 4 ways to build a string that I can think of off the top of my head.
Simple String Building
string.Format
(what I prefer for readability, especially with bigger string construction)
or StringBuilder? or string.Concat(string, string...) or some other method I can't think of at the moment. I can think of possibly valid times when I might want to use anyone method over anouther but thought I would let the experts weigh in.
For string arrays StringCollections are heck of Fast, is StringBuilder the speedy equivalent?
Just some random StringBuilding related thoughts.
MTS
Simple String Building
Code:
int val = 2112;
string myString = "SomeValue " + val.ToString();
string.Format
(what I prefer for readability, especially with bigger string construction)
Code:
int val = 2112;
string myString = string.Format("SomeValue {0}", val);
or StringBuilder? or string.Concat(string, string...) or some other method I can't think of at the moment. I can think of possibly valid times when I might want to use anyone method over anouther but thought I would let the experts weigh in.
For string arrays StringCollections are heck of Fast, is StringBuilder the speedy equivalent?
Just some random StringBuilding related thoughts.
MTS