C#泛型请教
我想在C#中写个限定泛型。
java中写是这样:
protected <T extends DmCallOutAdapta> T callService(String path, DmCallInput inputParam, Class outputParamType) throws Exception,指定返回类型必须继承DmCallOutAdapta
我C#是这样写的 protected <T : DmCallOutAdapta> T callService(),不对啊?C#该如何写啊?
------解决方案--------------------本帖最后由 caozhy 于 2013-11-21 12:47:17 编辑
protected T callService<T>(string path, DmCallInput inputParam, Type outputParamType) where T : DmCallOutAdapta
{
}