how to get last 10 characters from string in c# using substring code example Example: c# get last two characters of string var result = str.Substring(str.Length - 2);