Extension methods on a static class? [duplicate]
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Can I add extension methods to an existing static class? I know i can do the below to extend a class. I have a static class i would like to extend. How might i do it? I would like to write ClassName.MyFunc() static public class SomeName { static public int HelperFunction(this SomeClass v) 回答1: You can't have extension methods on static classes because extension methods are only applicable to instantiable types