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