S
Sam
Hi all
I asked a similar question a few days ago but I'm still confused. I'm new to
VB.Net so could someone please explain the following:
According to the .Net documents posted on the MS website "To create an
instance of a class, use the New keyword. Unlike value types, such as
Integer and Double, objects are reference types, and you must explicitly
create them before you can use them".
1. Can an object be both reference and value types?
2. Aren't Integer and Double objects (isn't everything in .Net object so
Integer and Double are reference types?)
3. If objects are reference type, then why the Size class, a value type
(Structure in Visual Basic, struct in C#) needs to use the New keyword to
create an instance of its class
Thank you
Sam
I asked a similar question a few days ago but I'm still confused. I'm new to
VB.Net so could someone please explain the following:
According to the .Net documents posted on the MS website "To create an
instance of a class, use the New keyword. Unlike value types, such as
Integer and Double, objects are reference types, and you must explicitly
create them before you can use them".
1. Can an object be both reference and value types?
2. Aren't Integer and Double objects (isn't everything in .Net object so
Integer and Double are reference types?)
3. If objects are reference type, then why the Size class, a value type
(Structure in Visual Basic, struct in C#) needs to use the New keyword to
create an instance of its class
Thank you
Sam