Multiple Instances New Class() C#
<p>What I've noticed, is using</p>

<p>Program.cs has</p>

<pre><code>public static List&lt;Client&gt; clients = new List&lt;Client&gt;();
</code></pre>

<p>the Button</p>

<pre><code> private void button1_Click(object sender, EventArgs e)
         {
                         Client client = new Client(combobox1.selecteditem);
                         Program.clients.Add(client);
         }
</code></pre>

<p>Client.cs
All variables are non-static public. But there is an eventhandler where on packetrecv, a class is called, this class is then filtered and processes</p>

<p>Where it is called is</p>

<pre><code>public void recieved(short op, string str, Client c)
        {
switch (op)
                {
case (short)OpCodes.matches:
                        {
                            c.something(c, str);
                            break;
                        }
}
}
</code></pre>

<p>Handler.cs</p>

<pre><code> public void something(Client c, string movement)
           {
                 if (movement == null)
                 c.coords = movement;
                 c.freeSpot = true;
             }
</code></pre>

<p>And in the above ^ the variables would overlap and freespotwould be made true throughout all the instances</p>

<p>will work find with one instance. But I'm trying to compile with multiple instances.
So creating a <code>button_onclick</code> would create a new instance using the above.</p>

<p>As the program is running, it runs flawlessly on one instance, but with 2+ instances, the variables in <code>MyClass</code> start to overlap. Is there a way to prevent this?</p>
