title: Is there any possible performance issue for `foreach(var w in S.Split())` here?
body: <p>Considering the code snippet</p>
  
  <pre><code>string S = "aa bb cc...";// very long string 
  foreach(var w in S.Split()){// &lt;-- how many invoke for Split() ?
                              // (Edited: After writing extension Method to test,
                              //it is invoked once.) 
      //do something
  }
  </code></pre>
  
  <p>Is there any performance issue for the above code? Do I need to re write it as below?</p>
  
  <pre><code>string S = "aa bb cc...";
  var strArray = S.Split();
  foreach(var w in strArray){
      //do something
  }
  
  </code></pre>