title: C# Error Index was outside the bounds of the array
body: <p>I have this code:</p>
  
  <pre><code>//other streamreader code
  var splitsByLine = content.Split('\n');
          foreach (var s in splitsByLine)
          {
              var nameAndSize = s.Split(',');
              FileNameAndSizes.Add(nameAndSize[0], Convert.ToInt64(nameAndSize[1]));
          }
  
          foreach (var item in FileNameAndSizes)
          {
              if(File.Exists(Path.Combine(Directory.GetCurrentDirectory(), "cleo",  item.Key)))
              {
                  FileInfo f = new FileInfo(Path.Combine(Directory.GetCurrentDirectory(), "cleo", item.Key));
                  var s1 = f.Length;
  
                  if (s1 != item.Value)
                  {
                      MessageBox.Show(f.Name + " modified file, please change it to default");
                  }
              }
          }
  </code></pre>
  
  <p>When I run code, i have error in this code:</p>
  
  <pre><code>FileNameAndSizes.Add(nameAndSize[0], Convert.ToInt64(nameAndSize[1]));
  </code></pre>
  
  <p><strong>Index was outside the bounds of the array.</strong> and something about 0x0.. I'm C# newbie, how can i fix it?</p>
  
  <p>It's content value:</p>
  
  <pre><code>AnimModByxXx2o1o.cs, 18616
  anims.cs, 18780
  Dance.cs, 18661
  emergencylights.cs, 32213
  fps-de-limiter.cs, 17575
  neon.cs, 19019
  StreamMemFix.cs, 17560
  sun.cs, 17662
  WEATHERMENUE.cs, 18437
  anim.cs, 17637
  anim[0].cs, 20684
  anim_0_.cs, 19392
  anim1.cs, 18744
  anim2.cs, 19012
  Anim4.cs, 22900
  anim228.cs, 19465
  </code></pre>
  
  <p>P.S I'm tested it with two files:
  First file (current) is getting value from mysql, prints it, and then I need to read value with C# app
  Second file (working) is create custom file write to it this content, and it's work ok :?</p>