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
name
Type: System.StringThe name of the requested property.
value
Type: TIf 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.