Incorrect Loop-to-LINQ conversion in R#: 5.0.1530.25

Hi,

R# suggest convert following code:

  1. var zonesIndex = new Dictionary<Guid, int>();
  2. for (int i = 0; i < zoneArr.Length; i++) zonesIndex.Add(zoneArr[i].Id, i);


into

  1. var zonesIndex = zoneArr.ToDictionary<Zone, Guid, int>(t => t.Id, t => i);



where 'i' undefined.

1 comment
Comment actions Permalink

I've created issue in out bug tracker for this problem:
http://www.jetbrains.net/jira/browse/RSRP-131023

0

Please sign in to leave a comment.