Extension Method for Generic Class [duplicate]
To extend any class public static class Extensions { public static T DoSomething<T>(this T obj) { //… } } To extend a specific generic class public static NeedExtension<T> DoSomething<T>(this NeedExtension<T> obj) { //… }