Hi All,
I am trying the follow the following MSDN tutorial:
Walkthrough: Authoring a Simple Multithreaded Component with Visual C#
(ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxmclicc/html/7bc03b7b-d680-499b-8179-5f414b2d650c.htm)
The tutorial says:
To create the Calculator component
From the Project menu, select Add Component.
Name the component Calculator.
To add public variables to the Calculator component
Open the Code Editor for Calculator.
Add statements to create public variables that you will use to pass
values from frmCalculations to each thread.
The variable varTotalCalculations will keep a running total of the total
number of calculations performed by the component, and the other
variables will receive values from the form.
Copy Code
public int varAddTwo;
public int varFact1;
public int varFact2;
public int varLoopValue;
public double varTotalCalculations = 0;
I am lost here, where do I create public variables within my component?
The source to my component currently looks as follows:
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace Calculations
{
public partial class Calculator : Component
{
public Calculator()
{
InitializeComponent();
}
public Calculator(IContainer container)
{
container.Add(this);
InitializeComponent();
}
}
}
Thanks for any help you can offer.
Kind regards.