Compiling a VS 2010 c# project (.NET 4.0, any CPU, allow unsafe code = checked) we are getting a variety of compile errors as below:
Operator '*' cannot be applied to operands of type 'System.IntPtr' and 'int'
Constant value '325486741' cannot be converted to a 'int' (use 'unchecked' syntax to override)
Cannot convert type 'string' to 'char*'
Cannot implicitly convert type 'long' to 'byte*'. An explicit conversion exists (are you missing a cast?)
Invalid expression term 'ref'
All these are occurring in 'unsafe' methods.
How to resolve these ?