Use StarUML to generate C# code class diagram

Download StarUML from the official website, free to use, address

public class RelatedClass
{
    
    
    private int id;
}
public class BaseClass
{
    
    
    public RelatedClass relatedClass;
    protected int baseParam;
    protected void BaseFunc() {
    
     }
}
public interface IMove
{
    
    
    public void Move();
}
public class ClassA : BaseClass, IMove
{
    
    
    int age;
    protected void AFunc() {
    
     }
    public void Move() {
    
     }
}
public class ClassB : BaseClass
{
    
    
    string name;
    protected void BFunc() {
    
     }
}

Write some simple code for testing, put them in different files

insert image description here

Put all code files into a folder

insert image description here
Click Reverse Code in StarUML, select the folder just now

insert image description here
Generate a directory structure on the right, click CsharpReverse

insert image description here
Click Overview Expanded to generate a code class diagram

insert image description here
There are redundant connections after generation, modify the directory structure on the right and regenerate

insert image description here
Right-click an element, you can set to display or hide some things in Format, such as hiding fields inherited from the base class, method

Guess you like

Origin blog.csdn.net/sinat_34014668/article/details/130313060