I used the following:
t.Description.Substring(0, 20)
But there is a problem if there are less than 20 characters in the string. Is there a simple way (single inline function) that I could use to truncate to a maximum without getting errors when the string is less than 20 characters?
How about:
Somewhat ugly, but would work. Alternatively, write an extension method: