Re: Classes, Properties, and structures
From: David Browne (meat_at_hotmail.com)
Date: 10/24/04
- Next message: Rob Teixeira: "Re: one way password encryption"
- Previous message: Dennis: "RE: Classes, Properties, and structures"
- In reply to: OpticTygre: "Re: Classes, Properties, and structures"
- Next in thread: David Browne: "Re: Classes, Properties, and structures"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 24 Oct 2004 15:52:59 -0500
"OpticTygre" <optictygre@adelphia.net> wrote in message
news:RLSdne5E0e-hieHcRVn-iQ@adelphia.com...
> Interesting point. I suppose also, that since it is a class, there is
> also the ability to add function, subroutines, events and such that apply
> specifically to an object of type "Person" whereas you wouldn't be able to
> do something like that with a simple structure.
You can add methods, properties, etc to a structure. The distinction
between a Class and a Structure is that a class is created on the heap, and
a structure is a ValueType created on the stack.
A ValueType which contains only ValueType's for fields will be created
entirely on the stack and won't generate any garbage.
David
- Next message: Rob Teixeira: "Re: one way password encryption"
- Previous message: Dennis: "RE: Classes, Properties, and structures"
- In reply to: OpticTygre: "Re: Classes, Properties, and structures"
- Next in thread: David Browne: "Re: Classes, Properties, and structures"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|