SyntaxFix
Write A Post
Hire A Developer
Questions
Using Substring is actually quite short and readable:
var result = mystring.Substring(mystring.Length - Math.Min(4, mystring.Length)); // result == "d124"