title: C# assign value to List<string> at specific index
body: <p>lets consider this snippet of C# code: </p>
  
  <pre><code>     List&lt;string&gt; a = new List&lt;string&gt;();
       a.Add("word1");
       a.Add("word2");
  </code></pre>
  
  <p>now lets say I want to have "word3" instead of word2. I can say </p>
  
  <pre><code>     a[1]="word2";
  </code></pre>
  
  <p>but if I try </p>
  
  <pre><code>     a.ElementAt(2) ="word2"; 
  </code></pre>
  
  <p>then I get an error saying the left hand side must be a variable.</p>
  
  <p>this syntax behaves in the same way for reference types and value types.
  can someone explain why the second syntax is flawed?</p>