I have finally managed to get my whole program working except for one small detail. I am taking a number from a textbox and rounding it to 2 decimal points. Then putting the number back into the textbox. The problem is if I input 2.00 I get back 2. So what I am trying to figure out is if I input either 2.00 or 2 I want to get 2.00 back into the textbox. Below is the code I use for the button that does this.
Thanks.

double varDAC0D;

private: System::Void btnDAC0_Click(System::Object^ sender, System::EventArgs^ e) {

// ^ anchor at the start
// (?=.*\d) # must contain at least one numeric character
// (?=.*[a-z]) # must contain one lowercase character
// (?=.*[A-Z]) # must contain one uppercase character
// .{8,10} # From 8 to 10 characters in length
// $ # anchor at the end",

// Test for numbers only to be inputed
//"^(start)[look for 0-9 and allow ". and -"to be used]{allow 1 to 4 digits}$(end)"
if (! System::Text::RegularExpressions::Regex::IsMatch(this->txtDAC0->Text,"^[0-9.-]{1,4}$"))
{
MessageBox::Show("Input Number Only","DAC0 Error");

//Clear textbox
this->txtDAC0->Clear();
}

else{
// Put contents of textbox txtDAC0 into double variable varDAC0D
varDAC0D = Double::Parse(txtDAC0->Text);

// Check if Input is less then 0,
if (0>varDAC0D){
// If yes then give error message
MessageBox::Show("DAC0 Less Then 0","DAC0 Error");
//Clear textbox
this->txtDAC0->Clear();
}
else{
//Check if Input is greater then 5
if(5<varDAC0D){
// If yes then give error message
MessageBox::Show("DAC0 Greater Then 5","DAC0 Error");
//Clear textbox
this->txtDAC0->Clear();
}
else {
// If both checks passed then do this
// Rounds varDAC0D to 2 decimal places and stores back into DAC0D
varDAC0D=Math::Round(varDAC0D, 2);

// Place rounded number in textbox txtDAC0 after converting varDAC0D into String
this->txtDAC0->Text=varDAC0D.ToString();


// Place IO device code here!!!!!
//Using Messagebox for now to show code works
MessageBox::Show("DAC0 Out","DAC0 Good");

}
}
}
}