NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PermissionSet.AddPermission

Adds a specified permission to the permission set if it does not exist. If a permission of the same type already exists in the permission set, then the existing permission object is returned and no change is made.

[Visual Basic]
Overridable Public Function AddPermission( _
   ByVal perm As IPermission _
) As IPermission
[C#]
public virtual IPermission AddPermission(
   IPermission perm
);
[C++]
public: virtual IPermission* AddPermission(
   IPermission* perm
);
[JScript]
public function AddPermission(
   perm : IPermission
) : IPermission;

Parameters

perm
Permission to add.

Return Value

perm

Exceptions

Exception Type Condition
ArgumentException if perm is not a permission object.

Remarks

Adding a permission that is already in the set has no effect.

See Also

PermissionSet Class | PermissionSet Members | System.Security Namespace