title: Looping over an array - getting every other item?
body: <p>I have a <code>.ini</code> file
  the .ini:</p>
  
  <pre><code>;app ...
  
      [MSGS]
  
      title#0 = first title.. 
      message#0 = first message 
  
      title#1 = second title
      message#1 = second message 
  
      title#2 = third title
      message#2 = third message  
  </code></pre>
  
  <p>I'm using  the <a href="http://nini.sourceforge.net/" rel="nofollow">Nini</a> lib for parsing. I need read it to a dictionary. </p>
  
  <p>I tried this:</p>
  
  <pre><code> public Dictionary&lt;string, string&gt; Read()
          {
              try
              {
                  Dictionary&lt;string, string&gt; result = new Dictionary&lt;string, string&gt;();
                  IConfigSource src = config;
                  IConfig values = src.Configs["MSGS"];
                  string[] keys = values.GetKeys();
  
                  for (int count = keys.Length / 2,i = 0, j = 1; 
                          i &lt; count; i++, 
                          j = i + 1)
                  {
                      string titleKey = keys[i];
                      string messageKey = keys[j];
                      string titleVal = values.Get(titleKey);
                      string messageVal = values.Get(messageKey);
                      result.Add(titleVal, messageVal);
  
                  }
              }
              catch (Exception)
              {
  
              }
              return null;
          }
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>first title.. : first message
  first message : second title
  second title : second message
  </code></pre>
  
  <p>I want:</p>
  
  <pre><code>first title.. : first message
  second title : second message
  third title : third message
  </code></pre>
  
  <p>How I do this? 
  Thanks in advance. :)</p>