Skip to content

typeof operator

CodingUnit edited this page Nov 2, 2011 · 4 revisions

typeof operator

  • Category: Data Types
  • Description: Demostrate how to use typeof operator.
  • Code:
using System;
using System.Console;

def SampleTypeOf()
{ 
    def intType = typeof(int);
    WriteLine($"$(intType.Name) can be retrieved by using typeof")
}

SampleTypeOf();
  • Execution Result:
Int32 can be retrieved by using typeof

Clone this wiki locally