PermissionSet.Count PermissionSet.Count PermissionSet.Count PermissionSet.Count Property

Definition

Gets the number of permission objects contained in the permission set.

public:
 virtual property int Count { int get(); };
public virtual int Count { get; }
member this.Count : int
Public Overridable ReadOnly Property Count As Integer

Property Value

The number of permission objects contained in the PermissionSet.

Implements

Examples

The following code example shows the use of the Count property to get the number of permission objects in a permission set. This code example is part of a larger example provided for the PermissionSet class.

// Display the number of permissions in the set.
Console::WriteLine( "Number of permissions = {0}", ps1->Count );
// Display the number of permissions in the set.
Console.WriteLine("Number of permissions = " + ps1.Count);
' Display the number of permissions in the set.
Console.WriteLine("Number of permissions = " & ps1.Count)

Remarks

In the None or Unrestricted state this returns zero, because no actual permission object instances are used.

Applies to