how take last 20 characher fro a string c# code example Example: c# get last two characters of string var result = str.Substring(str.Length - 2);