Hello -- I'm a Resharper newbie, and it just did something (good) that surprised me, and I wanted to know what this option is called and whether / how it can be configured.
I have a program in which I assign a value to a property named Segments of type IEnumerable<Segment>. The value is created by a gigantic LINQ SelectMany, and details are unimportant. Right after the assignment, I started to type
and before I could blink, Resharper spit out
foreach (var segment in Segments)
which is, of course, exactly what I was going to say. I didn't expect anything to happen, let alone this spooky mindreading! How did it guess I was going to foreach over my newly created property and not over some other enumerable property in the class (there are a lot of other IEnumerables in the class)? How did it know that "segment" is a reasonable name for the var -- I didn't suggest it? Is it doing some kind of NLP along with the mind-reading?
again, this is cool and good, but I want to more about it so maybe I can *count* on it in the future :)