Obtain type information using the typeof operator : typeof « Operator « C# / CSharp Tutorial






using System;
using System.Text;

class MainClass
{
    public static void Main()
    {

        Type t1 = typeof(StringBuilder);

    }
}








3.16.typeof
3.16.1.Using typeof
3.16.2.Demonstrate typeof
3.16.3.typeof a Class name
3.16.4.Using typeof operator in if statement
3.16.5.Obtain type information using the typeof operator
3.16.6.Assign returning value from 'Typeof Operator' to 'Type' variable