Possible Duplicate:
How would you count occurences of a string within a string (C#)?
how do I get the count of the occurrences of '#' in a string ?
something like int RowFormat = drr[3].ToString("#").Length;
example string "grtkj####mfr "
RowFormat must return 4
and yes ^_^ .NET 3.5
int RowFormat = "grtkj####mfr".Count(ch => ch == '#');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With