Casting String Builder in C#

The following code explains the casting between "val" and "String Builder".

using System;
using System.Text;

namespace forgetCode
{

    class program
    {
        public static void Main()
        {
            object val = new StringBuilder();
            if (val is StringBuilder) // Cast 1.
            {
                StringBuilder builder = val as StringBuilder; // Cast 2.
                Console.WriteLine(builder.Length == 0);
            }               

        }
    }
}


Output:

True