Reporter |
![]() |
---|---|
Created | Jan 27, 2012 3:20:01 PM |
Updated | Jan 27, 2012 3:20:01 PM |
Priority | Show-stopper |
Type | Feature |
Fix versions | No Fix versions |
State | Open |
Assignee | Sergey Coox (coox) |
Subsystem | Quick Fixes |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
currently R# does not offer a quick-fix for this. I am not sure whether it is possible always, but in many cases (e.g. when the IEnumerable is being passed as a method argument and is not being modified inside the method) these options might work for IEnumerable<T> ienum:
- using an auxiliary variable T[] ienumToArray = ienum.ToArray();
- using an auxiliary variable List<T> ienumToList = ienum.ToList();
- using an auxiliary variable ReadOnlyCollection<T> ienumToROC = ienum.ToList().AsReadOnly();