>I have a numvericupdown on a form where I allow the use to enter in a decimal value. Except everytime I go to get the value from that control it doesnt hold the decimal value and only takes the integer? Does this control not hold decimals, I found something online that said it truncated it, but I couldnt beleive it!
David,
What is DecimalPlaces set to?
I have DecimalPlaces set to 2 and this code works like a charm (from a button click):
decimal d = this.numericUpDown2.Value;
MessageBox.Show(d.ToString());
I would reccomend using the following code though:
decimal d = Decimal.Round(this.numericUpDown2.Value, (int)this.numericUpDown2.DecimalPlaces);
MessageBox.Show(d.ToString());
Einar
Semper ubi sub ubi.