Cannot convert lambda expression to type 'string' because it is not a delegate type

Posted by SheoNarayan under Error and Solution on 7/31/2011 | Points: 10 | Views : 4831 | Status : [Administrator] | Replies : 1

I was getting error "Cannot convert lambda expression to type 'string' because it is not a delegate type " when trying to write the LINQ query at the place of where word.

The solution of this problem is use "using System.Linq;" at the top of class. "where" is not understood by the compiler unless System.Linq namespace is used.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com



Responses

Posted by: Akiii on: 8/1/2011 [Member] Bronze | Points: 25

Up
0
Down
Its a helpful tip Sir...

Thanks and Regards
Akiii

SheoNarayan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response