1
General Board / Generics
« on: February 16, 2007, 10:08:32 am »
If I have the following code:
public interface IMyInterface<T>
{
T GetMyObject();
}
public class MyClass : IMyInterface<MyObject>
{
MyObject GetMyObject();
}
I do not know how to make in EA so that the GetMyObject method in MyClass class changes the return type from T to MyObject automatically when the IMyInterface<MyObject> was specified.
Any ideas?
public interface IMyInterface<T>
{
T GetMyObject();
}
public class MyClass : IMyInterface<MyObject>
{
MyObject GetMyObject();
}
I do not know how to make in EA so that the GetMyObject method in MyClass class changes the return type from T to MyObject automatically when the IMyInterface<MyObject> was specified.
Any ideas?