LocationMy.User.IsInRole SyntaxDim result As Boolean = My.User.IsInRole(role) or Dim result As Boolean = My.User.IsInRole(builtInRole)
DescriptionThe IsInRole method indicates whether the current user belongs to the indicated role (true) or not (False). The function accepts a predefined member of the BuiltInRole enumeration or a String with the name of a role. Usage at a GlanceIf the current user is using a non-Windows authentication method and the BuiltInRole enumeration syntax of this method is used, the final part of the enumeration name is converted into a string, and that text is used as a lookup, as if the String syntax of this method had been called instead. Related Framework Entries
See AlsoCurrentPrincipal Property, InitializeWithWindowsUser Method, IsAuthenticated Property, Name Property (My.User), User Object |