Click here to Skip to main content
16,003,902 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
how to compile unsafe code i got error massafe when i write unsafe keyword


unsafe code may only appear if comiling with unsafe
Posted
Comments
Sergey Alexandrovich Kryukov 14-Nov-11 14:53pm    
Did you look at all the items of project properties? Would be a good idea.
--SA

1 solution

Sure, you need to allow unsafe code as a command line parameter of a compiler. MSBuild does it for you if you set an appropriate flag in the project file. With Visual Studio do it using appropriate check box in the project Properties -> Build -> "Allow unsafe code".

Look, you better look through all the compiler / project / Visual Studio options and menus before getting to serious project; same goes about the language and fundamentals of the platform used.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900