{
public static
void Main(string[]
args)
{
IEnumerator ienum1 =
SecurityManager.PolicyHierarchy();
while (ienum1.MoveNext())
{
PolicyLevel pol = (PolicyLevel)ienum1.Current;
Console.WriteLine(pol.Label);
IEnumerator ienum2 =
pol.NamedPermissionSets.GetEnumerator();
while (ienum2.MoveNext())
{
NamedPermissionSet permset =
(NamedPermissionSet)ienum2.Current;
Console.WriteLine(permset.Name
+ ", " + permset.Description);
}
}
}
}