I'd like to display e^x = answer
in a label on a Windows Form, but using the appropriate superscript rather than ^x
.
x
is the user's input from a text box, answer is Math.Exp(x)
. All of the variables are declared and the calculations are done after the user clicks the e^x
button (it's a simple calculator application).
Unicode for superscript 4-9 is \u2074
to \u2079
. I just realized superscript 2 and 3 follow a different pattern, but I'll worry about that later
I've been trying various ways to concatenate \\u207
and my x
variable but the result displayed on my label is either \u207x
or System.Char[]
Is there a way to do what I'm trying to accomplish? Or am I approaching this the wrong way?