I have a StringBuilder
instance where I am doing numerous sb.AppendLine("test");
for example.
How do I work out how many lines I have?
I see the class has .Length
but that tells me how many characters in all.
Any ideas?
Sorted by efficiency:
The last one is extraordinary expensive and generates lots of garbage, don't use.