SecurityPermissionFlag.UnmanagedCode
Hi,
I have a console application. When I am done with the calculation and want the application to exit.My code does not work.
So I use the below code:
SecurityPermission SP = newSecurityPermission(SecurityPermissionFlag.UnmanagedCode);
System.Environment.Exit(1);
I use the below namespaces:
using System.Security.Permissions;
using System.Security;
when I try to debug to find out the cause, It executes these line but the cmd prompt does not close.
|