c# get last symbol in string code example
Example 1: c# get last two characters of string
var result = str.Substring(str.Length - 2);
Example 2: get last character of string c#
str = str.Substring(str.Length - 1);
var result = str.Substring(str.Length - 2);
str = str.Substring(str.Length - 1);