Question

I want to be able to do this.

MyInterface interface = new ServiceProxyHelper<ProxyType>();

Here's the object structure

MyTypeThatImplementsMyInterface : MyInterface

Will this work?

public class ProxyType : MyInterface {}

public class ServiceProxyHelper<ProxyType> : IDisposable, MyInterface {}
Was it helpful?

Solution

I think this is what you're trying to do:

public class ServiceProxyHelper<T> where T : MyInterface { ... }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top