If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Reference and Value Type differences between C# and VB.NET

Do C# reference and value types exist in VB.NET?

So if I create 2 classes of the same type and 2 structs of the same type
then make them equal to each other. When I make a change to the class types
the changes reflect in both because its a reference type but not in the
struct type because its a value type. Does also apply to VB.NET?

Re: Reference and Value Type differences between C# and VB.NET

Yes and it was already like that in previous VB releases... Object variables
are just "pointers"...

Patrice

"Humberto Morales" <humberto@socal.rr.com> a écrit dans le message news:3b8f3216@news.devx.com...
> Do C# reference and value types exist in VB.NET?
>
> So if I create 2 classes of the same type and 2 structs of the same type
> then make them equal to each other. When I make a change to the class
types
> the changes reflect in both because its a reference type but not in the
> struct type because its a value type. Does also apply to VB.NET?
>
> Thanks in advance.
>
> H
>
>

Re: Reference and Value Type differences between C# and VB.NET

Yes. Reference and Value types are defined by the common type specification,
and apply to all .NET languages.
>So if I create 2 classes of the same type and 2 structs of the same type
>then make them equal to each other.

You can use the equals operator on any type that is polymorphic.
>When I make a change to the class types
>the changes reflect in both because its a reference type but not in the
>struct type because its a value type. Does also apply to VB.NET?

Re: Reference and Value Type differences between C# and VB.NET

Thanks
"Humberto Morales" <humberto@socal.rr.com> wrote in message
news:3b8f3216@news.devx.com...
> Do C# reference and value types exist in VB.NET?
>
> So if I create 2 classes of the same type and 2 structs of the same type
> then make them equal to each other. When I make a change to the class
types
> the changes reflect in both because its a reference type but not in the
> struct type because its a value type. Does also apply to VB.NET?
>
> Thanks in advance.
>
> H
>
>