The user is going to enter "empNumBox" from a text box. In some point I need to use the amount entered which is of type
"System::Windows::Forms::TextBox^". I would like to use the amount enterdina switch to get the right employee. Unfortunately, thatswitch willaccept only integers.
protected:
private: System::Windows::Forms::TextBox^ empNumBox;
.
.
.
switch (empNumBox)
{
case 1:
{
.
.
}
break;
case 2:
{
.
.
}
break;
case 3:
{
.
.
}
break;
default: MessageBox::Show(" This is an invalid employee number.\n Please try again! ",L" Error ");
}
I may have to use property like this:
property TextBox^ EmpNum
{
TextBox^ get(){return empNumBox; }
void set(TextBox^ p) {empNumBox = p ;}
}