How to represent a C# property in UML?

I usually prepare my UML diagrams in Visio (I know, I know; but what’re ya gonna do?).

When diagramming properties, they end up as so:

+------------------------+
| MyClass                |
|------------------------|
| - _foo : int           |
|------------------------|
| «property» + Foo : int |
+------------------------+

«property» being a custom stereotype derived from «operator».

Ugly, I know. But it works, and it’s clear. I do constructors the same way.

Leave a Comment