Monday, February 2, 2009

Unsafe code may only appear if compiling with /unsafe in VisualStudio 2005

Hi,
Here is the error which i got when using unsafe code
Unsafe code may only appear if compiling with /unsafe
Here is the solution for the above error
Add the following line under system.codedom /compilers
compiler language="C#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/unsafe" /

No comments: