Returns the value of the NBElement passed in as a Nullable<TimeSpan> after first converting it to the convertVia type.
Namespace: IBM.Broker.PluginAssembly: IBM.Broker.Plugin (in IBM.Broker.Plugin.dll) Version: 9.0.0.0
public static Nullable<TimeSpan> ToNullableTimeSpan(
NBElement value,
NBElementTimeSpanType convertVia
)
public static Nullable<TimeSpan> ToNullableTimeSpan(
NBElement value,
NBElementTimeSpanType convertVia
)
Public Shared Function ToNullableTimeSpan (
value As NBElement,
convertVia As NBElementTimeSpanType
) As Nullable(Of TimeSpan)
Public Shared Function ToNullableTimeSpan (
value As NBElement,
convertVia As NBElementTimeSpanType
) As Nullable(Of TimeSpan)
public:
static Nullable<TimeSpan> ToNullableTimeSpan(
NBElement^ value,
NBElementTimeSpanType convertVia
)
public:
static Nullable<TimeSpan> ToNullableTimeSpan(
NBElement^ value,
NBElementTimeSpanType convertVia
)
static member ToNullableTimeSpan :
value : NBElement *
convertVia : NBElementTimeSpanType -> Nullable<TimeSpan>
static member ToNullableTimeSpan :
value : NBElement *
convertVia : NBElementTimeSpanType -> Nullable<TimeSpan>
Return Value
Type:
Nullable
TimeSpan The current element's value converted to a
Nullable<TimeSpan> data type using the specified conversion of the element.
Exception | Condition |
---|
System FormatException | Thrown if the value can not be converted to a Nullable<TimeSpan> with the given conversion. |
As there are multiple choices when converting from a broker type to a
Nullable<TimeSpan>, this method allows you greater control over
how the convertion is performed. The
value is first converted to the
convertVia type, and then
subsequently converted to a
Nullable<TimeSpan>.