title: Why is my C# struct is being reset when passed into a method
body: <p>I am creating a simple text-game. My <code>Character</code> struct keeps resetting it <code>Can</code> value.  What am I doing wrong and how do I fix it? Here is the code:</p>
  
  <pre><code>namespace MyNamespace
  {
     struct Character
     {
        public float Can;
        //...
     }
  
     class MainClass
     {
        public static void Move (Character a)
        {
           bool cal = true;
  
           while (cal) 
           {
              Thread.Sleep(500);
  
              if(a.Can &lt;= 100)
              {
                 a.Can += 1;
              }
              else
              {
                 cal = false;
              }
           }
       }
    }
  
    //...
  }
  </code></pre>