Share via


AddressItem.TryGetDisplayName method (String)

The TryGetDisplayName method tries to get the display name of this TryGetDisplayName object.

Namespace:  Microsoft.Exchange.Data.Mime
Assembly:  Microsoft.Exchange.Data.Common (in Microsoft.Exchange.Data.Common.dll)

Syntax

'Declaration
Public Function TryGetDisplayName ( _
    <OutAttribute> ByRef displayName As String _
) As Boolean
'Usage
Dim instance As AddressItem
Dim displayName As String
Dim returnValue As Boolean

returnValue = instance.TryGetDisplayName(displayName)
public bool TryGetDisplayName(
    out string displayName
)

Parameters

  • displayName
    Type: System.String

    The string in which to store the display name.

Return value

Type: System.Boolean
The TryGetDisplayName method returns true if it successfully read the display name. If the encoding of the display name is unsupported, TryGetDisplayName returns false, and displayName is set to a null reference (Nothing in Visual Basic).

Remarks

The TryGetDisplayName method provides access to the value stored in the DisplayName property only if the DisplayName property uses an encoding that is supported.

See also

Reference

AddressItem class

AddressItem members

TryGetDisplayName overload

Microsoft.Exchange.Data.Mime namespace