Why it keeps complain "cs1525 Invalid expression term '['
I write a simple program:
and it can not be compile,just shows me the error message:cs1525 Invalid expression term '['
I write a simple program:
and it can not be compile,just shows me the error message:cs1525 Invalid expression term '['
Comments
You don't say which version of LinqPad you are running, but I suspect it may be one that does not support Collection expressions which I think is a C# 12 feature.
According to https://www.linqpad.net/Download.aspx it looks like only LinqPad 7 and 8 support it.