views:

1030

answers:

4

hi

why i get this error: Unsafe code may only appear if compiling with /unsafe ?

i work in C# Visual-studio 2008 programming on WinCE

thank's

+3  A: 

Probably because you're using unsafe code.

Are you doing something with pointers or unmanaged assemblies somewhere?

Gerrie Schenck
+2  A: 

Search your code for unsafe blocks or statements. These are only valid is compiled with /unsafe.

Richard
+5  A: 

To use unsafe code blocks, the project has to be compiled with the /unsafe switch on.

Open the properties for the project, go to the Build tab and check the Allow unsafe code checkbox.

Guffa