[Mono-list] CS0278 "ambiguous implementation of `enumerable' pattern"

Chris Seaton chris at chrisseaton.com
Thu Jan 18 12:33:34 EST 2007


Whenever I use "for each" on an IList<> I get CS0278


                     foreach (string file in files)
                         runtime.Import(file);


Katahdin.Debugger/RuntimeThread.cs(65,21): warning CS0278:  
`System.Collections.Generic.IList<string>' contains ambiguous  
implementation of `enumerable' pattern. Method  
`System.Collections.IEnumerable.GetEnumerator()' is ambiguous with  
method `System.Collections.Generic.IEnumerable<string>.GetEnumerator()'
/Library/Frameworks/Mono.framework/Versions/1.2.2.1/lib/mono/2.0/ 
mscorlib.dll (Location of the symbol related to previous warning)
/Library/Frameworks/Mono.framework/Versions/1.2.2.1/lib/mono/2.0/ 
mscorlib.dll (Location of the symbol related to previous warning)

I searched in the bug database and found 80408, but in my case it's  
applying to the standard libraries, not user defined code.

What's going wrong?

Thanks

Chris Seaton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070118/b55ed5ce/attachment.html 


More information about the Mono-list mailing list