2
Answers

C#.net switch statement

jasminie

jasminie

13y
1.7k
1
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)