Visual Guard Class Library Documentation

VGMembershipUser.IsMemberOfApplication Property

Returns a boolean value indicating whether the user is a member of the current application.

public Boolean IsMemberOfApplication {get;}

Remarks

A user is a member of an application when this user is member of a role of this application or member of shared role with a permission set of this application.

You can use the property ApplicationId to determines the application for which the VGMembershipUser was created.

Example

The following code show how to test if a user is a member of the current application:

[Visual Basic]
If user.IsMemberOfApplication Then
    MessageBox.Show(string.Format("'{0}' is a member of the application", user.UserName)
End If
[c#]
if (user.IsMemberOfApplication)
{
    MessageBox.Show(string.Format("'{0}' is a member of the application", user.UserName);
}

See Also

VGMembershipUser Class | Novalys.VisualGuard.Security.Membership Namespace