C Sharp/Conversions

From Meshplex

Jump to: navigation, search

[edit] C# Conversions

Nearly anything can be converted in anything. Here's an example: To get the sum of two double Numbers in a Textbox, you have to Convert the textBox Text into a Double and then, when you want to print this into the textBox, you have to reconvert it into Text.

textBox1.Text = Convert.ToString(Zahl1 + Convert.ToDouble(textBox1.Text));