Follow

What is CS1526?

Symptoms

When trying to enter play mode, I am receiving the error below:

error CS1526: A new expression requires () or [] after type

Cause

The CS1526 error is displayed when the new operator is not specified correctly.

In the example below we have declared an array, but have missed out the squared brackets.

Resolution

To resolve the CS1526 error you will need to add the correct parentheses to the declaration, squared brackets for an array and round brackets when creating a new object as show below.

More Information

https://msdn.microsoft.com/en-us/library/cz0x62kh(v=vs.90).aspx

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.