Safely truncating a string in C# that may be `null`
<p>I have the following method but it fails if the string is null. How could I make it just return a null if the string is null?</p>

<pre><code>public static string Truncate(this string value, int maxChars)
{
    return value.Length &lt;= maxChars ?
           value :
           value.Substring(0, maxChars) + " ..";
}
</code></pre>

<p>Could someone also explain to me what the "this" is there for. Sorry I'm not so good at C# and this is not my code.</p>
