DurationTry Parse Method
Construct a new Duration object from a duration specified in a string. Parameters specify the
duration and the variable where the new Duration object is returned.
Definition
Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
True if successfully parsed or false if the value could not be parsed
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
C#
public static bool TryParse(
string? duration,
out Duration? result
)VB
Public Shared Function TryParse (
duration As String,
<OutAttribute> ByRef result As Duration
) As BooleanC++
public:
static bool TryParse(
String^ duration,
[OutAttribute] Duration% result
)F#
static member TryParse :
duration : string *
result : Duration byref -> bool Parameters
- duration String
- The string that specifies the duration.
- result Duration
- When this method returns, this contains an object that represents the duration specified by s, or Zero if the conversion failed. This parameter is passed in uninitialized.
Return Value
BooleanTrue if successfully parsed or false if the value could not be parsed