[Solved] string.Substring not working correctly in C#


It’s actually working correctly. There is a leading space on the string and thus the ninth index is the space just before the DU. Consider this diagram:

 Jun30/13 DU SJ9802
0123456789

You’re starting on the ninth index, and that’s a space .

1

solved string.Substring not working correctly in C#