Your question suggests to me that you are very confused about basic aspects of programming in C#. That is not a "bad" thing ... remember that everyone here, at one time, was a beginner.
I strongly suggest you get a good book on C# and go over the "basics;" Charles Petzold's ".NET Book Zero" can be downloaded ... free ... here: [
^].
Points to understand:
1. A Class definition, like your 'myClass, is a kind of abstraction; it's a blue-print for the construction of
instances of the Class.
2. You create an
instance of a Class with the 'new operator:
myClass InstanceOfMyClass = new myClass();
3. Once you have an instance you can then operate with/to/using (assign to, invoke, access) the public fields, properties, and methods of the Class:
InstanceOfMyClass.a = 100;
InstanceOfMyClass.Setit();
4. by creating public methods with parameters, you enable additional behavior:
<br />
public void SetAValue(int newavalue)<br />
{<br />
a = newavalue;<br />
}
5. you can also use public properties to get/set values:
private int _a;<br />
public int A {<br />
set { _a = value; }<br />
get { return _a; }<br />
}
Here the private integer variable '_a is called the "backing field" of the Property. .NET offers a simpler way to create a Property with a (hidden) private backing field:
public int A { set; get; }
Now, it's time for
you to get to work; there is a certain amount of basic knowledge you need to master, and only
you can do this. Get the book by Petzold, or another book on starting C#, and start experimenting. Most people learn by a combination of study and trial-and-error experiments.
You can get the free Visual Studio package, and ... get started.