Confusion with using properties from another class with instances
<p>I have instantiated an object from another class in order to use properties from that class.  Everything works fine within the button event, however, outside of the button event I get an error telling me my instantiated object is being used as a type.  If I take this very same code and cut and paste it into the button event, I do not receive an error message.  I do not understand what is happening and why.  The object is instantiated whether it is inside or outside of the button event so why doesn't it work outside of the button event?  I need those two label fields auto-filled from another form as soon as the form opens, not when the button is clicked. </p>

<p>Here is my code:</p>

<pre><code>public partial class MeasurementsForm : Form
{
    private MeasurementsBOL busObject = new MeasurementsBOL();

    //autofill bodyfat and body weight from nutrition form when form opens
    busObject.BodyFatB4 = double.Parse(lblBodyFatB4FromNutrition.Text);
    busObject.BodyWeightB4 = double.Parse(lblWeightB4FromNutrition.Text);

    //default constructor
    public MeasurementsForm()
    {
        InitializeComponent();
        busObject.InitializeConnection();
    }        

    //event handler for B4 input data
    private void btnEnterMeasurementsB4_Click(object sender, EventArgs e)
    {


        //convert input data and assign to variables
        busObject.ChestMeasurementB4 = double.Parse(txtChestB4.Text);
        busObject.WaistMeasurementB4 = double.Parse(txtWaistB4.Text);
        busObject.HipsMeasurementB4 = double.Parse(txtHipsB4.Text);
        busObject.RightThighB4 = double.Parse(txtRightThighB4.Text);
        busObject.LeftThighB4 = double.Parse(txtLeftThighB4.Text);
        busObject.RightArmB4 = double.Parse(txtRightArmB4.Text);
        busObject.LeftArmB4 = double.Parse(txtLeftArmB4.Text);

        //call method to save input data
        busObject.SaveB4Data();

        //clear text boxes of data
        this.txtChestB4.Clear();
        this.txtWaistB4.Clear();
        this.txtHipsB4.Clear();
        this.txtRightThighB4.Clear();
        this.txtLeftThighB4.Clear();
        this.txtRightArmB4.Clear();
        this.txtLeftArmB4.Clear();

        //close form
        this.Close();
    }
</code></pre>

<p>Here are my two properties from the MeasurementsBOL class.  Although I don't show it, the object has been instantiated:</p>

<pre><code>//properties for variables
public double BodyFatB4 
{
    get { return bodyFatB4; }
    set { bodyFatB4 = nutritionObject.BodyFatStart;}
}

public double BodyWeightB4 
{ 
    get { return bodyWeightB4; }
    set { bodyWeightB4 = nutritionObject.BodyWeight; }
}
</code></pre>
