Follow

What is CS0227?

Symptoms

I am receiving the error below:

error CS0227: Unsafe code requires the `unsafe' command line option to be specified

Cause

The CS0227 error is caused when you have added the unsafe keyword to a method but have not specified the command line option.

 

Resolution

To fix the CS0227 error you will need to tell the compiler that you will be using pointers an any methods marked with the unsafe keyword. This article will show you how to do it for the Editor and the iOS

Editor:

1. Create a text file and enter the following:

-unsafe

2. Save the text file into your asset folder as "smcs.rsp".

3. Restart the editor.

Android:

 

More Information

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