所有物件皆有,回傳執行時確切型別的 Type 實例。
// C#
int n = 3;
Type t = n.GetType(); // System.Int32
// VB
Dim n As Integer = 3
Dim t As Type = n.GetType() ' System.Int32
Dim t As Type = GetType(Integer) ' 等同 C# typeof(int)
// C#
Type t = Type.GetType("System.Int32");
// VB
Dim t As Type = Type.GetType("System.Int32")
參數必須為完整型別名稱(含命名空間),非 C# int 或 VB Integer 關鍵字。