i have the following code:
string initial;
string final;
public bool BothPopulated()
{
//Initial > Final Value
if ((int.Parse(initialValueTxt.Text)) > (int.Parse(finalValueTxt.Text)))
{
MessageBox.Show("Initial Value > Final Value." + Environment.NewLine + "Please adjust so that the Initial Value < Final Value.", "Input Error");
initialValueTxt.Focus();
return false;
}
//Both Contain correct values
else
{
initial = initialValueTxt.Text;
final = finalValueTxt.Text;
return true;
}
}
the string variables will be in the form1 class. I want to place the method BothPopulated() in a class library. In the class library, i create the variables initial and final of type string (both priavte), and then have public Getters which return their value to the form1 class?
Is this correct or not?
Thanks

New Topic/Question
Reply



MultiQuote






|