Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

/unsafe (C# Compiler Options)

The /unsafe compiler option allows code that uses the unsafe keyword to compile.

/unsafe

For more information about unsafe code, see Unsafe Code and Pointers (C# Programming Guide).

To set this compiler option in the Visual Studio development environment

  1. Open the project's Properties page.

  2. Click the Build property page.

  3. Select the Allow Unsafe Code check box.

For information about how to set this compiler option programmatically, see AllowUnsafeBlocks.

Compile in.cs for unsafe mode:

csc /unsafe in.cs
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.