|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Convert code line to VBHello,
Could someone, please, convert the following code line to VB.NET? bool containsValue = myList.Any(item => item.NameParameter == nameParameterValue); (This is .NET 3.5. I couldn't find a converter that does this) Thanks, Miguel On Sun, 25 Nov 2007 16:00:26 -0800 (PST), shapper <mdmo***@gmail.com>
wrote: >Hello, The => introduces a Lambda expression. I don't hve VB2008 installed> >Could someone, please, convert the following code line to VB.NET? > >bool containsValue = myList.Any(item => item.NameParameter == >nameParameterValue); > >(This is .NET 3.5. I couldn't find a converter that does this) > >Thanks, >Miguel right now so I can't verify this, but I think it is: Dim containsValue as Boolean = myList.Any( Function(item) item.NameParameter = nameParameterValue ) Miquel,
Jack's answer: Dim containsValue As Boolean = myList.Any(Function(item) item.NameParameter = nameParameterValue) Is correct for the RTM version of VS 2008. -- Show quoteHide quoteHope this helps Jay B. Harlow [MVP - Outlook] ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "shapper" <mdmo***@gmail.com> wrote in message news:3e3ae102-3e42-4d51-8747-755aeab1d9a2@b15g2000hsa.googlegroups.com... > Hello, > > Could someone, please, convert the following code line to VB.NET? > > bool containsValue = myList.Any(item => item.NameParameter == > nameParameterValue); > > (This is .NET 3.5. I couldn't find a converter that does this) > > Thanks, > Miguel
Removing reference type members from a generic list clone
vs2008 or not Creating a Web Service (Service, not Client) from WSDL XML Deserializer problem Reurning Arrays Question about Application Layout Bug in VWD 2008 Express? Editing an indexed PixelFormat Where are use scoped settings stored? working with a com interface |
|||||||||||||||||||||||