private void BackgroundWorker1_DoWork(
            object sender,
            System.ComponentModel.DoWorkEventArgs e)
        {
            AreaClass2 AreaObject2 = (AreaClass2)e.Argument;

            // Return the value through the Result property.
            e.Result = AreaObject2.CalcArea();
        }
        public void TestArea2()
        {
            InitializeBackgroundWorker();

            AreaClass2 AreaObject2 = new AreaClass2();

            AreaObject2.Base   = 30;
            AreaObject2.Height = 40;

            // Start the asynchronous operation.
            BackgroundWorker1.RunWorkerAsync(AreaObject2);
        }