It's not a lambda expression...see example. > -----Original Message----- > From: Discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED] On Behalf Of Frans Bouma > Sent: 28 February 2008 14:42 > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] extensions methods and type inference.... > > > I seem to be haveing problems with extension methods.... > > > > sometimes the compiler complains... > > > > "does not contain a definition for 'BLA' and no extension method 'BLA' > > accepting a first argument of type 'WHATEVER...' could be found (are you > > missing a using directive or an assembly reference?)" > > > > (I've changed the class names to make the error readable) > > > > now one would think that that meant there that there was no solution to > > the 'pattern' match/inference....but I can actually explicitly define > the > > types e.g. > > > > x.BLA<int,object>(foo,bar); > > > > and the compiler will happily accept it...and run it. > > > > is there a bug in the type inference mechanism? > > > > if there were more than 1 solution to the inference I would expect the > > compiler to ask me to specify them...as it does sometimes....any ideas? > > if 'foo' and/or 'bar' are lambda expressions, you get this error, > as > lambda expressions in code aren't instances, they need a type to get > compiled, > and not specifying int/object in BLA forces the compiler to check the > parameter (foo/bar) to learn the type for int/object, however THOSE are > needed > for foo/bar ;) > > FB > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com
CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is UK House, 180 Oxford Street, London W1D 1DS, UK. =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com