Use `String.Substring`

. Assuming that `x`

is a string of length at least
`n`

, to get the last `n`

characters, you would use `x.Substring(x.Length-n)`

.

Note that the above assumes that the string is at least `n`

characters long. For a more robust version,
you might use something like: `x.Length < n ? x.Substring(x.Length-n) : x`

.

[Author: Jon Skeet]