TimeZone.TryConvert MethodTimeZone.TryConvert MethodTimeZone::TryConvert Method

Syntax

Public Shared Function TryConvert( _
    duration As DayTimeDuration, _
    <Out>result As ByRef TimeZone _
) As Boolean
public static bool TryConvert(
    DayTimeDuration duration,
    out TimeZone result
)
public:
static bool TryConvert(
    DayTimeDuration duration, 
    [Out] TimeZone% result
)
 

Parameters

duration

Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration

The duration of the time zone to construct.

result

Type: out XmlPrime.TimeZoneByRef XmlPrime.TimeZoneXmlPrime::TimeZone%

When this method returns, contains the TimeZoneTimeZoneTimeZone value represented by duration if the conversion succeeded, or UTC (Z) if the conversion failed.

Return Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue if the conversion is successful, or falseFalsefalse if duration is not a valid value for a TimeZoneTimeZoneTimeZone.