在&QUOT错误; ambigous参考"指向同样的方法两次
我用this辉煌的解决方案以LINQ查询转换为数据表。但我运行时,它得到一个奇怪的错误。构建成功,虽然。
I used this brilliant solution to convert a linq query to a datatable. But I'm getting a strange error when running it. Build succeeds though.
Compiler Error Message: CS0121: The call is ambiguous between the following methods or properties:
'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet
(System.Collections.Generic.IEnumerable<Gruppkoll.MessageSet>)' and
'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet
(System.Collections.Generic.IEnumerable<Gruppkoll.MessageSet>)'
我已经试过重新构建它并重新启动IIS。它似乎有两班用同样的方法,但我已经检查这一点,事实并非如此。
I've tried re-building it and restarting the IIS. It seems as there are two classes with the same method but I've checked this and that's not the case.
任何想法?我使用.NET 4.0 ASP.NET Web表单
Any ideas? I'm using .NET 4.0 ASP.NET Webforms
我通过移动类APP_ code目录以外的解决了这个问题。为什么可以在这里找到解释:http://stackoverflow.com/questions/1282636/the-call-is-ambiguous-between-the-following-methods-or-properties-bug
I solved it by moving the class outside of the App_Code directory. Explanation of why can be found here: http://stackoverflow.com/questions/1282636/the-call-is-ambiguous-between-the-following-methods-or-properties-bug