Follow

What is CS0266?

Symptoms

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

error CS0266: Cannot implicitly convert type double' to float'. An explicit 
conversion exists (are you missing a cast?)

Cause

The CS0266 error is caused when trying to assign the value of a double to a float.

Resolution

The error CS0266 is resolved by either casting the double's value as a float, or by using a float instead of a double. Please see the example below for guidance:

More Information

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