Have a look to the following examples:
public class Program
{
public static void Main()
{
string test= "0123456789";
string subString1= test.Substring(9, 1);
string subString3= test.Substring(9, 1);
}
}
Note *1)
It is questionable to throw in that case an exception. Most other languages will simply return the available characters.
[Edit]
Note *1) , Thanks to Richard for his hint.
Some languages do not throw an Exception in that case.
I hope it helps.