Class CustomTimeFormat
Represents a single time format used for parsing and formatting.
Inheritance
Implements
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Input.Toolkit.dll
Syntax
public sealed class CustomTimeFormat : ITimeFormat
Constructors
| Improve this Doc View SourceCustomTimeFormat()
Initializes a new instance of the Custom
Declaration
public CustomTimeFormat()
CustomTimeFormat(String)
Initializes a new instance of the Custom
Declaration
public CustomTimeFormat(string format)
Parameters
Type | Name | Description |
---|---|---|
System. |
format | The format that is used to parse or display a String or DateTime. |
Properties
| Improve this Doc View SourceFormat
Gets or sets the custom format that is used to parse or display a String or DateTime.
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceEquals(Object)
Determines whether the specified System.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj | The System. |
Returns
Type | Description |
---|---|
System. |
True if the specified System. |
Overrides
Exceptions
Type | Condition |
---|---|
System. |
The |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
A hash code for the current System. |
Overrides
GetTimeDisplayFormat(CultureInfo)
Gets the format to use to display a DateTime as a time value.
Declaration
public string GetTimeDisplayFormat(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | The culture. |
Returns
Type | Description |
---|---|
System. |
A format to use during display of a DateTime. |
GetTimeParseFormats(CultureInfo)
Gets the format to use to parse a string to a DateTime.
Declaration
public string[] GetTimeParseFormats(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | Culture used to determine formats. |
Returns
Type | Description |
---|---|
System. |
An array of formats to be used during parsing. |
Operators
| Improve this Doc View SourceEquality(CustomTimeFormat, CustomTimeFormat)
Implements the operator ==.
Declaration
public static bool operator ==(CustomTimeFormat left, CustomTimeFormat right)
Parameters
Type | Name | Description |
---|---|---|
Custom |
left | The left instance to compare. |
Custom |
right | The right instance to compare. |
Returns
Type | Description |
---|---|
System. |
The result of the operator. |
Inequality(CustomTimeFormat, CustomTimeFormat)
Implements the operator !=.
Declaration
public static bool operator !=(CustomTimeFormat left, CustomTimeFormat right)
Parameters
Type | Name | Description |
---|---|---|
Custom |
left | The left instance to compare. |
Custom |
right | The right instance to compare. |
Returns
Type | Description |
---|---|
System. |
The result of the operator. |