----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: Rohit_BD Message 3 in Discussion I feel there is another reason why C# doesn't have optional parameters. Method overloading in C# requires that 2 methods with the same name must have parameters of different types (or different no. of parameters) and this takes ONLY the types into consideration. So to the C# compiler, these are equivalent as far as identifying the methods goes: void MyMethod(int x) void MyMethod(out int x) void MyMethod(ref int x) void MyMethod(int x = 10) Each will generate the same method signature and is confusing to the compiler. Hence C# doesn't support optional parameters. In contrast, C/C++ supports this but then once such a method has been defined, another method with the same name must have different parameter type or no. of parameters must be different. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/mumbaiusergroup/_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]
