Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to represent "event" in a UML Class Diagram?

This is my code snippet

public class Notation : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;

    private Notes _note;
}

How to write public event PropertyChangedEventHandler PropertyChanged; in UML Class diagram properly?

First, I think it's :

+PropertyChanged: PropertyChangedEventHandler

But then, I realized that it doesn't represent the event part of the code.

Any idea? Thanks

like image 393
Moses Aprico Avatar asked Jul 10 '14 16:07

Moses Aprico


1 Answers

Here is the UML stereotype in the game. Just stereotype this property:

enter image description here

Note that _note is a plain, private property.

like image 63
Aleks Avatar answered Oct 29 '22 21:10

Aleks