Show / Hide Table of Contents

Class TimeParser

Converts the specified string representation of a time to its DateTime equivalent.

Inheritance
System.Object
TimeParser
CatchallTimeParser
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Input.Toolkit.dll
Syntax
public abstract class TimeParser

Methods

| Improve this Doc View Source

TryParse(String, CultureInfo, out Nullable<DateTime>)

Converts the specified string representation of a time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded.

Declaration
public virtual bool TryParse(string text, CultureInfo culture, out DateTime? result)
Parameters
Type Name Description
System.String text

The text that should be parsed.

System.Globalization.CultureInfo culture

The culture being used.

System.Nullable<System.DateTime> result

The parsed DateTime.

Returns
Type Description
System.Boolean

True if the parse was successful, false if it was not.

  • Improve this Doc
  • View Source