I have the following classes and interfaces:
public interface IThing
{
string Name { get; }
}
public class Thing : IThing
{
public string Name { get
You need to define your class like this I believe:
public class MyThingConsumer : ThingConsumer
The reason is that ThingConsumer is already typed in its definition with this: where T : IThing
Now, you can make the call return new MyThingConsumer.
This should in turn match the expected return type of ThingConsumer
EDIT
Sorry for the confusion, here is what should work:
public class MyThingConsumer : ThingConsumer where T : IThing
and
return new MyThingConsumer();