As a non-.NET programmer I\'m looking for the .NET equivalent of the old Visual Basic function left(string, length). It was lazy in that it worked for any lengt
left(string, length)
Another one line option would be something like the following:
myString.Substring(0, Math.Min(length, myString.Length))
Where myString is the string you are trying to work with.