How can I display a negative symbol in .NET?

.net, c#, silverlight, winforms, wpf

Solution

Use the Unicode character `SUPERSCRIPT MINUS (U+207B)` `⁻`.

For example:

7-⁻5 = 13 

EDIT: Or, with a `MINUS SIGN (U+2212)` `⁻` for the minus:

7 − ⁻5 = 13 

Problem

I want to display a negative symbol from a string in .NET. I want a string that represents an equation that looks something like this: 7--5=12 But when displayed, I want the 2nd minus sign to be slightly raised so it looks more natural as a negative sign instead of just 2 minus signs in a row. Is this possible?

Original source