jasminie

jasminie

  • NA
  • 78
  • 0

C#.net switch statement

Aug 30 2011 12:58 PM
I would like to setup a switch statement in a C#.net 2008 desktop application. I basically want to check for who has 'group' access according to the active directory. The following is the two statements I am using to obtain the active directory groups.

AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
Thread.CurrentPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());

Some how I would need to use Thread.CurrentPrincipal. How would you set this up in the switch statement?


Answers (2)