Pregunta

Quiero poder hacer esto.

MyInterface interface = new ServiceProxyHelper<ProxyType>();

Aquí está la estructura del objeto.

MyTypeThatImplementsMyInterface : MyInterface

esto funcionara?

public class ProxyType : MyInterface {}

public class ServiceProxyHelper<ProxyType> : IDisposable, MyInterface {}
¿Fue útil?

Solución

Creo que esto es lo que estás intentando hacer:

public class ServiceProxyHelper<T> where T : MyInterface { ... }
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top