title: Initialize an array (string or any other data type) inside a Struct
body: <p>I'm looking to do this in C#.</p>
  
  <pre><code>public struct Structure1
  { string string1 ;            //Can be set dynamically
    public string[] stringArr; //Needs to be set dynamically
  }
  </code></pre>
  
  <p>In general, how should one initialize an array dynamically if need be?
  In simplest of terms, I'm trying to achieve this in C#:</p>
  
  <pre><code>  int[] array;  
    for (int i=0; i &lt; 10; i++) 
          array[i] = i;  
  </code></pre>
  
  <p>Another example:</p>
  
  <pre><code>  string[] array1;  
        for (int i=0; i &lt; DynamicValue; i++) 
              array1[i] = "SomeValue";
  </code></pre>