예제 #1
0
 public void TestImplicitCastExtension()
 {
     Integer i = new Integer(42);
     RuntimeServices.WithExtensions(typeof (IntegerExtensions), delegate
        	{
        		Assert.AreEqual(42, Coerce(i, typeof (int)));
        	});
 }
예제 #2
0
 public static int op_Implicit(Integer i)
 {
     return i.Value;
 }