A
Andy Read
Dear all,
From the following examples. Can anyone please tell me why the C# IL
produces the unbox statement and the VB doesn't?
* Forgive me if the code isn't perfect, I don't have VS.NET on my internet
machine!
VB
Dim X as Integer
Dim Y as Object = X '** Box here.
X = CType(X,Integer) '** No Unbox here??
C#
int X;
Object Y = X; // Box here
X = (int) Y; // Unbox here
Many Thanks
Andy Read
From the following examples. Can anyone please tell me why the C# IL
produces the unbox statement and the VB doesn't?
* Forgive me if the code isn't perfect, I don't have VS.NET on my internet
machine!
VB
Dim X as Integer
Dim Y as Object = X '** Box here.
X = CType(X,Integer) '** No Unbox here??
C#
int X;
Object Y = X; // Box here
X = (int) Y; // Unbox here
Many Thanks
Andy Read