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