Reputation: 8487
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 a digram for Person
class like:
I know about the UML diagram but it dosen't create what I am expecting. As far as I know it only creates the inheritence hierarchy.
I am using Visual Studio 2015 community edition. Can anyone tell me the tool to create the class digram as I mentioned above?
Thanks!
Upvotes: 7
Views: 5431
Reputation: 6315
yUML is a Visual Studio extension which should layout your classes in the way you want.
It will automatically render your class and property associations using 'dependency links' without having to do it manually (using Class Diagram), but of course, it's an extension you'll need to download.
Upvotes: 0
Reputation: 10070
Right click on .cs file having your classes and click on View Class Diagram:
After that go to the class property you want and right click then choose Show As Association
Upvotes: 6