title: Splitting a string value inside list<>
body: <p>I have a list contained within a dictionary that contains the follwing values</p>
  
  <pre><code>value a
  value b
  value c
  value 1, value 2, value3
  value d
  </code></pre>
  
  <p>the end result I would like is </p>
  
  <pre><code>value a
  value b
  value c
  value 1
  value 2
  value 3
  value d
  </code></pre>
  
  <p>problem is iterating through the dictionary and trying to change the collection will not work as I am trying to modify it while looping through it</p>
  
  <pre><code>string[] ar;
          foreach (var kvp in dict)
          {
              if (kvp.Key == "STAR-016")
              {
                  foreach (var v in kvp.Value)
                  {
                      if (v.Contains(','))
                      {
                          ar = v.Split(',');
                          foreach (var a in ar)
                          {
                              kvp.Value.Add(a);
                          }
                      }
                  }
              }
          }
  </code></pre>
  
  <p>how can i get the desired result?</p>