last 4 chars of string c# code example
Example 1: c# get last 3 characters of string
var result = input.Substring(input.Length - 3);
Example 2: last two characters of string c#
string str = "Hello World";
string substr = str.Substring(str.Length - 2);