Follow

What is CS1656?

Symptoms

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

error CS1656: Cannot assign to `___' because it is a `___'

Cause

The CS1656 error is caused when an invalid assignment occurs. In the example below, we show the error being caused when trying to assign a integer value to a method group. This error is also caused by assigning a value to a foreach iteration variable.

Errors displayed in this example:

error CS1656: Cannot assign to `MyMethod' because it is a `method group'

Resolution

To fix the CS1656 error you will need to use the assignment in the correct fashion. In this example case we can presume that we are trying to pass the "MyMethod" function the value of 7. This has been corrected in the script below.

 

More Information

https://msdn.microsoft.com/en-us/library/369xac69.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.