user3123734
user3123734

Reputation: 45

Unable to use LINQPAD4

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 '{'

Upvotes: 2

Views: 675

Answers (1)

Karl-Johan Sjögren
Karl-Johan Sjögren

Reputation: 17622

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.

Upvotes: 6

Related Questions