The old compiler used to report:
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
Roslyn:
Only assignment, call, increment, decrement, and new object expressions can be used as a statement
reported here: https://stackoverflow.com/questions/50514829/why-a-declaration-doesnt-give-a-cs0201-compiler-error/50515400#answer-50515400
The old compiler used to report:
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
Roslyn:
Only assignment, call, increment, decrement, and new object expressions can be used as a statement
reported here: https://stackoverflow.com/questions/50514829/why-a-declaration-doesnt-give-a-cs0201-compiler-error/50515400#answer-50515400