What's New?
Code Repository
Component Library
Tech Blog
Terms
of Code Use
Bringing something good and unforseen.
>
Code Repository
Error: Unsafe code may only appear if compiling with /unsafe
Return
Error: Unsafe code may only appear if compiling with /unsafe
When a c# project needs to use pointers and memory management you need to declare your class as "unsafe". But then you experience the above error when compiling. To allow your code to compile do the following:
In VS.NET go to the project property page of the project that contains your class which is declared "unsafe" and in “configuration properties > build” set Allow Unsafe Code Blocks to True.
Return
©
2013
Fortunate. All rights reserved.
contact:
justin@aboutfortunate.com