Question

I'm a new user using LINQPAD4. LINQPAD 4 throws error when I type anything in the Query window...

For the below sentence

string[] names = { "Tom", "Dick", "Harry" };

I see

Invalid expression term 'string'

Syntax error; value expected

) expected

Invalid expression term '{'
Was it helpful?

Solution

Thats because you try to run this as a C# Expression in Linqpad. What you need it to set it to C# Statement(s) in the dropdown just above the code area.

The C# Expression-option is used if you want to try out pure Linq-statements against a datasource.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top