Re: Type inference in extension methods...
Fabian Schmied <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
Hi Marc! > I've simplified it as much as I can! and created and example....Boom9 does work...Boom10 wont infer...even though there is a solution (explicitly stated)...and there's not another obvious one The C# compiler's goal is (probably) not to be able to infer the correct solution in every possible case. Instead, there is a defined set of rules the compiler follows. You can read up on them here: <http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c669b09/csharp%20language%20specification.doc> (pages 142ff.). When you've read them, do you still think the compiler should be able to find the solution in your sample? Fabian =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives