Representing a C# Generic Method in a UML Class Diagram

Andreas Grech picture Andreas Grech · Jan 17, 2010 · Viewed 10.8k times · Source

I have the following interface:

public interface IRegisterable
{
   T Register<T>(string username, string passw) where T : User, ICanLogin, new();
}

User is an abstract class, and ICanLogin is another interface.

Now, I want to represent the above interface with its method in a UML Class Diagram, in Visio.

How can I represent the above generic method with its constraints in a Class Diagram ?

Answer

salgo60 picture salgo60 · Jan 17, 2010