In his excellent book Jeffrey Richter says the Microsoft guidelines
recommend operators are accompanied by a friendly public instance method
that calls the operator method internally. For example the suggested CLS
compliant name for operator + is Add. Does anyone know...

/1/ why the friendly method should be an instance method rather than a
static method?

/2/ why the C# compiler generates a static method called op_Addition for
operator+ rather than the recommended instance method called Add?

Thanks
Jon Jagger

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to