2uzhan.com
Advertisement
Now Place:2uzhan.com » Is there a way to use extensions to extend the static methods of a class

Is there a way to use extensions to extend the static methods of a class

C-Sharp Programming @ June 15, 2010   Views:0

It would appear no since I can not find anything on the internet that talks about doing this, but I just thought I would check to see if it was just the examples that required and instance of the object to use the extension

--------------Solutions-------------

With extension methods you extend whole class, not particular method, so I don't understood you question well. You want to be able to do something like Object.ExtensionMethod(). Than you can simply do YourClass.ExtensionMethod(). Keep in mind that extension methods are just syntactic sugar.

Tags:
© 2018 2uzhan.com Contact