| 1. |
How To Compile Unsafe Code? |
|
Answer» For compiling unsafe code, we have to specify the /unsafe COMMAND-line switch with command-line compiler. For example: to COMPILE a PROGRAM named “myClass.cs” containing unsafe code the command line command is: csc /unsafe myClass.cs In Visual Studio IDE at first we need to enable use of unsafe code in the PROJECT properties. The steps are given bellow:
For compiling unsafe code, we have to specify the /unsafe command-line switch with command-line compiler. For example: to compile a program named “myClass.cs” containing unsafe code the command line command is: csc /unsafe myClass.cs In Visual Studio IDE at first we need to enable use of unsafe code in the project properties. The steps are given bellow: |
|