Suppose I have a string:
"34234234d124"
I want to get the last four characters of this string which is "d124"
. I can use SubString
, but it needs a couple of lines of code, including naming a variable.
Is it possible to get this result in one expression with C#?