using System;
public class MainClass
{
static void Main() {
int j = 123;
object boxed = j;
object obj = new Object();
Console.WriteLine( "boxed {0} int", boxed is int ? "is" : "isnot" );
Console.WriteLine( "obj {0} int", obj is int ? "is" : "isnot" );
Console.WriteLine( "boxed {0} System.ValueType", boxed is ValueType ? "is" : "isnot" );
}
}
|