Your sample code will not even compile, let alone run, so it is difficult to see how you manage to get any result. The correct code would be something like:
string foo ="samplestring";
string bar = foo.Substring(foo.Length - 4, 4);
Console.WriteLine("Substring: {0}", bar);