How to create a C # class diagram in visual studio 2015 /

I need to create a class diagram from my existing code. Suppose I have the following classes -

public class Person { public string Name { get; set;} public int Age { get; set;} public Address Address { get; set; } public Education Education { get; set; } } public class Address { public string AddressLine1 { get; set; } .... } public class Education { public string CollegeName { get; set; } .... } 

I want to create digram for the Person class, for example:

enter image description here

I know about the UML diagram, but it does not create what I expect. As far as I know, it creates a hierarchy of inheritance.

I am using the Visual Studio 2015 community version. Can someone tell me a tool to create a digram class, as I mentioned above?

Thanks!

+6
source share
2 answers

Right-click the .cs file with your classes and click View Class Diagram: enter image description here

After that, go to the required class and right-click, then select Show As Association

enter image description here

+6
source

yUML is a Visual Studio extension that should place your classes the way you want.

It automatically converts your class and property associations using "dependency links", without having to do it manually (using the class diagram), but of course this is the extension you need to download.

yUML Screenshot

0
source

All Articles