I have something like:
public interface IExample
{
int GetInteger()
T GetAnything(); //How do I define a function with a generic return type???
^^^^^
}
Is this possible???
If the whole interface should be generic:
public interface IExample<T>
{
int GetInteger();
T GetAnything();
}
If only the method needs to be generic:
public interface IExample
{
int GetInteger();
T GetAnything<T>();
}