How to write a destructor " ~Foo() " in a PlantUML class diagram

0 votes
asked Dec 22, 2022 in Question / help by YannG

~ is a reserved symbol for private package... so that what i want to be written as ~Foo() appears like this : . What can I do ?

2 Answers

+1 vote
answered Dec 22, 2022 by anonymous
Found... as simple as escaping the ~ character. So I juste wrote \~Foo() instead of ~Foo()
commented Dec 22, 2022 by Todd Musheno (2,680 points)
This is a very language specific thing, so I guess it depends on the programming language you are using.
0 votes
answered Jan 12, 2023 by BenceSzalai (200 points)

You can prefix it with a visibility indicator, such as + for public, so you'd write: +~Foo()

...