I have written some extension Methods to convert an IEnumerable and an IList into a string. Now, as IList inherits from IEnumerable, I have to name them differently.
I just wonder if there is a way to avoid that? Can I have an extension Method on an IEnumerable and then a different one on an IList with the same name and the same signature? Kinda like an override, except that Extension methods are of course static.
I would just like to use a more efficient method body on a List without having to have a second Method name.
And yes, I know that in this specific case, I should run a profiler first to really see if the second method is better, but I'm interested if it's generally possible to override extension methods in derived classes.