title: C# value/reference passing?
body: <p>I have a declared entity of a class, and want to assign different pre-made templates to it without the templates ever changing. Using a const doesn't seem to do the trick.</p>
  
  <p>Example:</p>
  
  <pre><code>Weapon w1;
  w1 = Sword; // premade weapon.
  w1.reducedamage(1); // for example a debuff
  </code></pre>
  
  <p>In this case the premade weapon's damage would be decreased, and it would no longer be available as a template. This problem becomes more profound with enemies.</p>
  
  <p>Example:</p>
  
  <pre><code>Enemy enemy;
  enemy = enemies[r] // r being a randomly generated integer and enemies a list of enemy templates
  Fight(player,enemy); // this method would resolve a fight between the two entities of the type Character.
  </code></pre>
  
  <p>This problem would not be visible in the player class, since player is a single reference being passed along all the game methods - because there is only one player. Every time the player fights, an enemy template would be "corrupted".</p>
  
  <p>How would I create templates or classes/structs in general that always pass by value, meaning that the properties of a first class would have the same values as a second, without any relationship between the two classes?</p>
  
  <p>The only success I've gotten with this is to create a method that manually copies each attribute of every class that has a template onto another entity of the same class; but this is extremely unpractical since it needs constant upgrading whenever a new class is added, or an old one changed.</p>