[Solved] Extract multiple sub-strings from a string in C#? [closed]


string str = "12345678901234";

string str1 = string.Empty;
string str2 = string.Empty;
string str3 = string.Empty;
for (int i = 0; i < str.Length; i++)
{
    if (i < 2)
        str1 += str[i];
    else if (i > 1 && i < 8)
        str2 += str[i];
    else
        str3 += str[i];
}

5

solved Extract multiple sub-strings from a string in C#? [closed]