MsgPropertyCollection.GetValue Method
Namespace: Rebex.Mail
Assembly: Rebex.Msg.dll (version 7.0.9083)
GetValue<T>(MsgPropertyTag)
Gets the value of a property specified by the property Tag.
Declaration
public T GetValue<T>(MsgPropertyTag tag)
Parameters
Type | Name | Description |
---|---|---|
MsgPropertyTag | tag | Tag of the property to return. |
Returns
Type | Description |
---|---|
T | Value of a property specified by the given tag. Throws KeyNotFoundException if the property Tag is not present. Throws InvalidCastException if the value cannot be converted to requested type. |
Type Parameters
Name | Description |
---|---|
T | Type of the value to return. |
GetValue<T>(MsgPropertyTag, T)
Gets the value of a property specified by the property Tag.
Declaration
public T GetValue<T>(MsgPropertyTag tag, T defaultValue)
Parameters
Type | Name | Description |
---|---|---|
MsgPropertyTag | tag | Tag of the property to return. |
T | defaultValue | Default value to return if the property is not found. |
Returns
Type | Description |
---|---|
T | Value of a property specified by the given tag;
or |
Type Parameters
Name | Description |
---|---|
T | Type of the value to return. |
GetValue<T>(MsgPropertyId)
Gets the value of a Numerical named property specified by the property LID.
Declaration
public T GetValue<T>(MsgPropertyId id)
Parameters
Type | Name | Description |
---|---|---|
MsgPropertyId | id | LID of the Numerical named property to return. |
Returns
Type | Description |
---|---|
T | Value of a Numerical named property specified by the given LID. Throws KeyNotFoundException if the property LID is not present. Throws InvalidCastException if the value cannot be converted to requested type. |
Type Parameters
Name | Description |
---|---|
T | Type of the value to return. |
GetValue<T>(MsgPropertyId, T)
Gets the value of a Numerical named property specified by the property LID.
Declaration
public T GetValue<T>(MsgPropertyId id, T defaultValue)
Parameters
Type | Name | Description |
---|---|---|
MsgPropertyId | id | LID of the Numerical named property to return. |
T | defaultValue | Default value to return if the property is not found. |
Returns
Type | Description |
---|---|
T | Value of a Numerical named property specified by the given LID;
or |
Type Parameters
Name | Description |
---|---|
T | Type of the value to return. |
GetValue<T>(String)
Gets the value of a String named property specified by the property Name.
Declaration
public T GetValue<T>(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the String named property to return. |
Returns
Type | Description |
---|---|
T | Value of a String named property specified by the given Name. Throws KeyNotFoundException if the property Name is not present. Throws InvalidCastException if the value cannot be converted to requested type. |
Type Parameters
Name | Description |
---|---|
T | Type of the value to return. |
GetValue<T>(String, T)
Gets the value of a String named property specified by the property Name.
Declaration
public T GetValue<T>(string name, T defaultValue)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the String named property to return. |
T | defaultValue | Default value to return if the property is not found. |
Returns
Type | Description |
---|---|
T | Value of a String named property specified by the given Name;
or |
Type Parameters
Name | Description |
---|---|
T | Type of the value to return. |