namespace ConsoleApplication8 { public class Foo<T> where T : IFoo, IFoo2 { public Foo(T fooThing) { } } public interface IFoo { string Name {get;} } public interface IFoo2 { string Name2 {get;} } }
(图像被拒绝,因为我没有足够的“信誉”点)
我遗漏了什么吗?基本上,我如何在VS2010 UML类设计器中建模,在代码示例中的多类型参数约束?
你说得对-VS不能证明这一点。用户界面只允许您选择一种约束类型。