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.ht m)
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 varTotalCalcula tions 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 varTotalCalcula tions = 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.Componen tModel;
using System.Collecti ons.Generic;
using System.Diagnost ics;
using System.Text;
namespace Calculations
{
public partial class Calculator : Component
{
public Calculator()
{
InitializeCompo nent();
}
public Calculator(ICon tainer container)
{
container.Add(t his);
InitializeCompo nent();
}
}
}
Thanks for any help you can offer.
Kind regards.