Udostępnij za pośrednictwem


DeliverableMailItem.TryGetProperty<T> Method

The TryGetProperty<T>(String, T) method returns the value of an extended property.

Namespace:  Microsoft.Exchange.Data.Transport
Assembly:  Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)

Syntax

'Declaration
Public MustOverride Function TryGetProperty(Of T) ( _
    name As String, _
    <OutAttribute> ByRef value As T _
) As Boolean
'Usage
Dim instance As DeliverableMailItem
Dim name As String
Dim value As T
Dim returnValue As Boolean

returnValue = instance.TryGetProperty(name, _
    value)
public abstract bool TryGetProperty<T>(
    string name,
    out T value
)

Type Parameters

  • T
    The type of the requested property value.

Parameters

  • value
    Type: T
    If a property with the specified name is not found or its type does not match the T parameter, this parameter is set to the default value of the type specified by the T parameter. Otherwise, the actual value is returned for immutable types; if the property is of type [System.Net.IPEndPoint] a cloned instance is returned; a [System.InvalidOperationException] is thrown for collections.

Return Value

Type: System.Boolean
The TryGetProperty<T>(String, T) method returns true if the specified property is found and its type matches the T parameter; otherwise, the method returns false.