I wonder if it is in any way possible to specialize generic interface methods somehow in C#? I have found similar questions, but nothing exactly like this. Now I suspect tha
You could do something like this:
public interface IStorage
{
void Store(object data);
void Store(T data);
}
public class Storage : IStorage
{
public void Store(object data)
{
Console.WriteLine("Generic");
}
public void Store(int data)
{
Console.WriteLine("Specific");
}
}
You've typed i as IStorage and that interface doesn't define the overloaded Store method.