An extension to the StringBuilder This is another pretty basic class I wrote for a library as I hate the way the default StringBuilder in .NET works.

Essentially, I wanted to have the + operator, as well as implicit conversions to strings. (Rather than needing .ToString() all the time.)

It's pretty small and simple, so there may not be a lot to critique.

Also, before you say "just inherit StringBuilder and extend it", it's sealed.

/// &lt;summary&gt;
/// This wraps the .NET &lt;code&gt;StringBuilder&lt;/code&gt; in a slightly more easy-to-use format.
/// &lt;/summary&gt;
public class ExtendedStringBuilder
{
    private StringBuilder _stringBuilder;

    public string CurrentString =&gt; _stringBuilder.ToString();

    public int Length =&gt; _stringBuilder.Length;

    public ExtendedStringBuilder()
    {
        _stringBuilder = new StringBuilder();
    }

    public ExtendedStringBuilder(int capacity)
    {
        _stringBuilder = new StringBuilder(capacity);
    }

    public ExtendedStringBuilder Append(string s)
    {
        _stringBuilder.Append(s);

        return this;
    }

    public ExtendedStringBuilder Append(char c)
    {
        _stringBuilder.Append(c);

        return this;
    }

    public ExtendedStringBuilder Append(object o)
    {
        _stringBuilder.Append(o);

        return this;
    }

    public static ExtendedStringBuilder operator +(ExtendedStringBuilder sb, string s) =&gt; sb.Append(s);

    public static ExtendedStringBuilder operator +(ExtendedStringBuilder sb, char c) =&gt; sb.Append(c);

    public static ExtendedStringBuilder operator +(ExtendedStringBuilder sb, object o) =&gt; sb.Append(o);

    public static implicit operator string(ExtendedStringBuilder sb) =&gt; sb.CurrentString;

    public override string ToString() =&gt; CurrentString;

    public string ToString(int startIndex, int length) =&gt; _stringBuilder.ToString(startIndex, length);
}


I didn't implement all the overloads of the .Append method (yet) or the + variants of them.

This can literally be used in the exact same manner as the .NET StringBuilder, or you can use += or + instead of .Append, and you can implicitly convert it to a string.
A couple of quick comments:

You can use the see tag's cref attribute. If you generate documentation, some tools will generate hyperlinks for you.

/// &lt;summary&gt;
/// This wraps the .NET &lt;see cref="StringBuilder"/&gt; in a slightly easier to use format.
/// &lt;/summary&gt;




The length property of a StringBuilder is read and writable. It's also really useful for it to be so:

var sb = new StringBuilder();
foreach (var i in Enumerable.Range(0,10))
{
    sb.AppendFormat("{0},", i);
}
sb.Length--; // removes the trailing comma.


That's a contrived example which is trivially served with string.Join but setting the length can be useful!



The _stringBuilder field should be readonly.



I'd say CurrentString is superflous. Just call _stringBuilder.ToString()



I must admit, personally I think the StringBuilder api is really good, I've never needed an implicit conversion to a string or felt the need to + rather than append to them.