Zesa Rex Zesa Rex - 2 months ago 9x
C# Question

How to make a textbox show me double?

I am trying to get myself used to C#, currently I am using SharpDevelop for that Task, anyway, I have a simple question, let's say I want to have a TextBox that Shows me the outcome of a mathematical code as shown below, how do I get the TextBox to actually Show me types like double, int, or other stuff? It always tells me it can't convert double to string or whatever, I am pretty noob so yeah.

void CmdWriteClick(object sender, EventArgs e)
double var = 8.40;
double start = 9.00;
double end = var + start;
textbox_end.Text = end;

I already tried to not use the .text but something like. value but didn't work, any help?


Just add .ToString()

textbox_end.Text = end.ToString()