I'd like to write an extension method for string, which appears as a static method on System.String - I've not managed to get that done.
Is that possible? If so how? Thanks!
I'd like to write an extension method for string, which appears as a static method on System.String - I've not managed to get that done.
Is that possible? If so how? Thanks!
It's not possible. Extension methods let you add what look like instance methods, and not static methods.
Why do you want do to that? Give us an example, and maybe we can come up with a different idea.