| title | ms.date | ms.prod | ms.technology | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | translation.priority.ht | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-unsafe (C# Compiler Options) |
2015-07-20 |
.net |
|
article |
|
|
|
fdb77ed9-da03-45bd-bb7f-250704da1bcc |
19 |
BillWagner |
wiwagn |
|
/unsafe (C# Compiler Options)
The /unsafe compiler option allows code that uses the unsafe keyword to compile.
Syntax
/unsafe Remarks
For more information about unsafe code, see Unsafe Code and Pointers.
To set this compiler option in the Visual Studio development environment
-
Open the project's Properties page.
-
Click the Build property page.
-
Select the Allow Unsafe Code check box.
For information about how to set this compiler option programmatically, see xref:VSLangProj80.CSharpProjectConfigurationProperties3.AllowUnsafeBlocks%2A.
Example
Compile in.cs for unsafe mode:
csc /unsafe in.cs See Also
C# Compiler Options
Managing Project and Solution Properties