----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: Mrinal Message 8 in Discussion Hi , This is the way i think it goes , .Net is primarily based on type system , where every thing is directly or indirectly derived from System.Object base class ( Reference type ) . Now for certain primitive types , which are existing across various languages and are recognized directly by the compiler and you don't really need even CLR for execution but for being on safe side MS ensures usage of CLR in all such cases even viz : int , float , double , long , char etc. , Now going further all of them are value types and they can't be null like any reference type variable , so : int i ; and int i = new int() ; are essentially same , even if i don't provide value in first case it will be initialized to 0 : Following is / are reasons for that : a. Compatibility with rest of the programming system , where most of the classes are initialized using new keyword , so if we do for any of the primitive types , then it shouldn't be an error . b. Type like int has static zero argument constructor , which gets called in either case and initialize the value to zero and assign relevant memory on the stack . hope it helps , regards , Mrinal ----------------------------------------------------------- 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]
