|
-
September 8th, 2005, 01:35 AM
#1
Structures in VB.net
do we suports Structures in vb.net, similar to C -
Struct
{
}
let me know if someone knows an answer to this.
No one does a virgin, life ****s you anyways
-
September 8th, 2005, 01:39 AM
#2
Re: Structures in VB.net
Nicolas Bohemier
-
September 8th, 2005, 01:13 PM
#3
Re: Structures in VB.net
This structure thing in VB.net actually supports methods and stuff, means that i behaves exactly like a class with the only difference that the struct cannot inherit information.
then under what cases would i decide on the difference between a structure and a class?
No one does a virgin, life ****s you anyways
-
September 8th, 2005, 03:04 PM
#4
Re: Structures in VB.net
Structure is a value type.
class is a reference type.
That means that structure is more effective - when boxing isn't needed.
Boxing is what happens when you need to treat a value type as reference type.
There is plenty of material on that subject on the net.
-
September 8th, 2005, 05:37 PM
#5
Re: Structures in VB.net
Structures are generally good for simple, relatively small data types, particularly with value-type fields, that do not need to be inherited and do not require a constructor with no arguments.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|