| DateTimeUtilitiesTryParseWithFallback Method |
Attempts to parse the specified string into a
DateTime object. First,
System.DateTime.TryParse is used to attempt a parse in the universal format.
If that fails, a parse is attempted using the current local date/time format.
Namespace: Sdl.LanguagePlatform.CoreAssembly: Sdl.LanguagePlatform.Core (in Sdl.LanguagePlatform.Core.dll) Version: 1.6.0.0 (1.7.3164.0)
Syntaxpublic static bool TryParseWithFallback(
string s,
out DateTime result
)
Public Shared Function TryParseWithFallback (
s As String,
<OutAttribute> ByRef result As DateTime
) As Boolean
public:
static bool TryParseWithFallback(
String^ s,
[OutAttribute] DateTime% result
)
static member TryParseWithFallback :
s : string *
result : DateTime byref -> bool
Parameters
- s
- Type: SystemString
The input string - result
- Type: SystemDateTime
If the method returns true, holds the DateTime value
of the successful parse, adjusted to Universal time. If the method returns false, the
value is undefined and should not be used.
Return Value
Type:
Booleantrue if a parse was successful, and
false otherwise.
See Also
Comments