Share via


SPClaimExtensionMethods.NameEquals method

Returns a value that indicates whether two ClaimsIdentity objects represent the same user.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function NameEquals ( _
    self As IClaimsIdentity, _
    claimsIdentity As Object _
) As Boolean
'Usage
Dim self As IClaimsIdentity
Dim claimsIdentity As Object
Dim returnValue As Boolean

returnValue = self.NameEquals(claimsIdentity)
public static bool NameEquals(
    this IClaimsIdentity self,
    Object claimsIdentity
)

Parameters

  • self
    Type: IClaimsIdentity
  • claimsIdentity
    Type: System.Object

    The second claim identity to compare.

Return value

Type: System.Boolean
true if two ClaimsIdentity objects have matching name properties; otherwise, false. The default is false when the SPClaimExtensionMethods object does not implement IClaimsIdentity.

Usage note

In Visual Basic and C#, you can call this method as an instance method on any object of type IClaimsIdentity. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=office.15) or https://msdn.microsoft.com/en-us/library/bb383977(v=office.15).

See also

Reference

SPClaimExtensionMethods class

SPClaimExtensionMethods members

Microsoft.SharePoint.Administration.Claims namespace