5
I was looking to practice the use of pointers in C#, so I created in a website the following method:
public static Nodo[] MontaTree(){ //... código ... }
Obviously the above code does not allow to use pointers, for this we need the keyword unsafe
. I put her in the method, leaving the signature like this:
public static unsafe Nodo[] MontaTree(){ //... código ... }
But I got the following message while compiling:
Unsafe code may only appear if compiling with /unsafe
When searching Google, the solution seemed simple: Just turn on the option Allow unsafe code
on the Build tab inside the project properties, but I can’t find this option anywhere in my project, as shown in the image:
Does anyone know if I’m doing anything wrong? Where is this option on VS2015? Or is it not possible on websites?
Related: What is the purpose of unsafe command?
– gato