I have a class like this:
public class Proxy<TClient>() where TClient : ClientBase<TChannel> { } I want to be able to specify something like this:
where TClient : ClientBase<TChannel> where TChannel : class but without specifying it in the class definition like so:
public class Proxy<TClient, TChannel>() Is there a way to do this or am I required to have the second type definition as above?
TChannelcome from?Proxy<TClient, TChannel>.TChannelis required forClientBase(which comes from System.ServiceModel). There is no non-generic alternative.TClientin your class? You could potentially omitTClientand just declare members usingClientBase<TChannel>, depending on usage.