A Discussion on software architectures, advanced programming algorithms and software runtime errors
June 30, 2011
Cannot apply indexing with [] to an expression of type System.Collections.Generic.IEnumerable
Error: Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<ANY_TYPE>
Solution:
If used of IEnumerable SampleArray then you can access to elements like:
- SampleArray[index]WRONG
- SampleArray.ElementAt(index)RIGHT
Because the IEnumerableinterface dose not support of [] for indexing :-))
0 comments:
Post a Comment