Search notes:

C# - operator typeof

The typeof operator takes as argument a (literal) type (such as System.Int32), not a variable, and returns a object whose type is the (internal) System.RuntimeType.
I try to demonstrate that with the following simple example:
using System;

class TypeOf_typeof {
   public static void Main() {
      Console.WriteLine($"typeof(object            ).GetType().FullName = {typeof(object            ).GetType().FullName}");
      Console.WriteLine($"typeof(System.Int32      ).GetType().FullName = {typeof(System.Int32      ).GetType().FullName}");
      Console.WriteLine($"typeof(System.Type       ).GetType().FullName = {typeof(System.Type       ).GetType().FullName}");
   }
}
//
// typeof(object            ).GetType().FullName = System.RuntimeType
// typeof(System.Int32      ).GetType().FullName = System.RuntimeType
// typeof(System.Type       ).GetType().FullName = System.RuntimeType
//
Github repository about-C-Sharp, path: /language/operators/type-testing_cast/typeof/type-of-typeof.cs
Because System.RuntimeType derives from System.Reflection.TypeInfo and System.RuntimeType is an internal type, the returned value should be considered a System.Reflection.TypeInfo.

Index