Hi all,
I'm trying to come to terms with pointers as I'm from a java background. I have a simple piece of code...
I compile it on the cmd line using...
csc /unsafe filemname.cs
When I try to run the .exe I get the following error...
Unhandled Exception: System.Security.Policy.PolicyException: Required permissions cannot be aquired
Any help will be gratefully received as I can't find a solution anywhere.
Thanks
Richie
I'm trying to come to terms with pointers as I'm from a java background. I have a simple piece of code...
Code:
using System;
public class TestClass
{
public unsafe static void Main ()
{
double d1 = 3.45;
//double* pD = &d1;
//double d2 = *pD;
Console.WriteLine ("d1 :" + d1);
Console.WriteLine ("&d1 :" + (int) &d1);
//Console.WriteLine ("pD :" + (int) pD);
//Console.WriteLine ("&pD :" + (int) &pD);
//Console.WriteLine ("d2 :" + d2);
//Console.WriteLine ("&d2 :" + (int) &d2);
}
}
I compile it on the cmd line using...
csc /unsafe filemname.cs
When I try to run the .exe I get the following error...
Unhandled Exception: System.Security.Policy.PolicyException: Required permissions cannot be aquired
Any help will be gratefully received as I can't find a solution anywhere.
Thanks
Richie