startIndex = k.IndexOf(" 43 ");
string test3 = k.Substring(startIndex, 32);
startIndex1 = k.IndexOf(" 54 ");
string test4 = k.Substring(startIndex, 55);
how to count no of characters between 2 indexes(startIndex and startIndex1) from a string in c#?
Loading
Roei BarPosted Sep 17, 2009, 3:40 AM
int totalSize = index1 - index ;
if you want to remove the the Spaces
string _totalText = text2.Substring(index,index1);
int _totalSizeNoSpace = _totalText.Trim().Length;