----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: ssv_2000 Message 1 in Discussion Hi all, I found this article on the net. http://www.csharphelp.com/archives3/archive505.html Please take time to go through this. There are 2 programs given as examples. Program#1 and Program#2. The author says the class MyType in program#2 is "Value Type". How so? Can we choose to implement our Custom Class as Reference Type or Value Type? What decides in what way CLR treats a type? I have been believing Enum and Structure Definitions are the only ways to create Custom Value Types and all Class Definitions are treated as Reference Types. Is that correct? MSDN says Enum derives from Value Type but it isnt a Value Type. Thats confusing. Does that mean Enums are Reference Types? Structure is Value Type, but if it contains members of Refernce type, those members will still behave as refernce types, meaning, if one variable of this structure type is assigned to another, all value type members would have new copies made, but reference types will just have the reference copied. Is that right? Please clarify. Any pointers to good articles on the topic appreciated. Thanks. SriVidya. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
