last 10 characters of string c# code example
Example 1: get last character of string c#
str = str.Substring(str.Length - 1);
Example 2: last two characters of string c#
string str = "Hello World";
string substr = str.Substring(str.Length - 2);
str = str.Substring(str.Length - 1);
string str = "Hello World";
string substr = str.Substring(str.Length - 2);