2

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 '{' 
1
  • what are you using C# Expression or C# Statement(s) or C# Program? Commented Dec 20, 2013 at 18:29

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.