title: C# & Unity - Adding and manipulating List elements with multiple values
body: <p>Unity &amp; C# (and generally new to coding) beginner here, so there is probably easy solution for this or i'm doing something terribly wrong. Also apologies for lack of terminology knowledge.</p>
  <p>I'm trying to add element to List with specific values, but i can't quite find the correct syntax to successfully add it.</p>
  <p>Here is a code:</p>
  <pre><code>public List&lt;ActiveEffects&gt; activeEffects;
  
  public void AddEffectToEnemy(Effect effect, int duration){
      activeEffects.Add(effect, duration);
  }
  
  [System.Serializable]
  public class ActiveEffects{
      public Effect effect;
      public int duration;
  }
  </code></pre>
  <p>What i want to do, is when AddEffectToEnemy function is executed, new element will be added with both variables (effect and duration) assigned. This is probably not the correct way, as the error i'm getting is &quot;No overload for method 'Add' takes 2 arguments&quot;.</p>
  <p>What i'm trying to do with this is a create a temporary 'storage' of applied effects to enemy in RPG-like game. At certain point AddEffectToEnemy is executed, which should apply specific effect to enemy for (duration) amount of time, by adding element with that information to activeEffects List. (other part of script will be checking regularly for active effects in this List)</p>
  <p>Can you please point me in right direction on how to properly implement this? I feel like i'm not doing this the right way. Thanks in advance.</p>