string - How to get the substring in C#? - Stack Overflow
If your input string could be less than five characters long then you should be aware that string.Substring will throw an ArgumentOutOfRangeException if the startIndex argument is negative. To solve this potential problem you can use the following code: s...