|
Listing 6-10 extracted from chapter
Security
Listing 6-9< > Listing 6-11
This listing can be compiled with the command line: csc.exe /target:exe Example_6_10.cs Errors: 0 Warnings: 0
Example_6_10.cs
using System;
using System.Security.Principal;
class Program {
static void Main() {
IIdentity id = WindowsIdentity.GetCurrent();
Console.WriteLine( "Name : " + id.Name );
Console.WriteLine( "Authenticated? : " + id.IsAuthenticated );
Console.WriteLine( "Authentication Type : " +id.AuthenticationType );
}
}
Copyright Patrick Smacchia 2006 2007
|