简体   繁体   中英

How to add multiple generic type constraints for a type parameter in VS 2010 UML Class Diagram parameterized type?

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;}
    }
}

The Template Parameter Collection Editor in VS 2010 UML class diagram designer, doesn't seem to allow you add multiple constraints to a single generic type parameter.

(image was rejected because I don't have enough "reputation" points )

Am I missing something? Basically, how do I model in VS 2010 UML Class Designer, multiple type parameter constraints like that in the code sample?

You're correct - VS can't show that. The UI only lets you pick one constraining type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM