AstaDev
AstaDev

Reputation: 11

How do I add a single existing class to a class diagram in visual studio?

I am using Visual Studio 2019 and would like to add an existing c# class to a class diagram.

Dragging the class from the solution explorer to the diagram always gives me a no-no cursor.

Do I have to manually edit the cd-file?

Edit: The class I want to add is one of multiple classes in one cs-File.

Upvotes: 0

Views: 53

Answers (1)

AstaDev
AstaDev

Reputation: 11

Apparently you have to drag a source code file from the solution explorer to a diagram. If the file contains multiple classes, all will be added.

If I only want to add one class, I have to remove all others manually from the diagram after adding the whole file.

Upvotes: 0

Related Questions