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 '{'
有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top