T
Tony Johansson
Hello!
I have three questions.
1. When is it useful to use boxing for value types.
2. I have earlier been using C and C++ for many years but the last year I
have been using C#.
In C# you can use pointer if you use unsafe directive but I can't see any
purpose to use the unsafe directive
with pointer. Is it right that the use of unsafe code with pointer is of no
use?
3.When you use the unboxing is it always nessesary that the type in the box
is always the same as the cast type.
An example
int i = 23;
object o = i;
i = (int)o;
//Tony
I have three questions.
1. When is it useful to use boxing for value types.
2. I have earlier been using C and C++ for many years but the last year I
have been using C#.
In C# you can use pointer if you use unsafe directive but I can't see any
purpose to use the unsafe directive
with pointer. Is it right that the use of unsafe code with pointer is of no
use?
3.When you use the unboxing is it always nessesary that the type in the box
is always the same as the cast type.
An example
int i = 23;
object o = i;
i = (int)o;
//Tony