Hi,
You missed one "0" before "3 2 30 20". I added that. Now the result is perfect..
Try this:
private void GetFormat()
{
string str = "2 3 40 300 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 4 30 200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 2 30 200";
string[] s4 = str.Split(' ');
int count = 0;
foreach (string s2 in s4)
{
if (count < 4)
{
Console.Write(s2 + "\t");
count++;
}
else
{
Console.WriteLine("");
count = 0;
}
}
}
Let me know if it works for you.
--Amit