G
Guest
Hello,
In my C# program I have a function that uses pointers. Is there a way to
tell the compiler to compile only this function with the unsafe switch and
compile the remaining project as safe code?
I enclosed the body of the function in unsafe block like this:
public static void Foo()
{
unsafe
{
// do nasty things with pointers here
}
}
but I still have to specify the /unsafe switch for the whole project. Is it
possible to compile it with unsafe for part of the code only?
Thanks
In my C# program I have a function that uses pointers. Is there a way to
tell the compiler to compile only this function with the unsafe switch and
compile the remaining project as safe code?
I enclosed the body of the function in unsafe block like this:
public static void Foo()
{
unsafe
{
// do nasty things with pointers here
}
}
but I still have to specify the /unsafe switch for the whole project. Is it
possible to compile it with unsafe for part of the code only?
Thanks