G
Guest
In many occasions I found code like this (especially in Microsoft's code)
object obj1
num1 = 0
[...
if ((obj1 as short) != 0
num1 = ((short) obj1)
But when I try to do it I get an error on (obj1 as short) saying that "The as operator must be used with a reference type ('short' is a value type)
So how come it works for others but not for me
Thanx
object obj1
num1 = 0
[...
if ((obj1 as short) != 0
num1 = ((short) obj1)
But when I try to do it I get an error on (obj1 as short) saying that "The as operator must be used with a reference type ('short' is a value type)
So how come it works for others but not for me
Thanx