문제

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