c#: any way to define an argument with both class and interface type?

后端 未结 0 1461
臣服心动
臣服心动 2020-12-10 09:17

I\'m essentially trying to find something like generic constraints for regular arguments, something like:

public void foo( Bar x) where x : ISomething {//code         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题