Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​DateTimeOffset
Assembly: System.Runtime
Implemented Interfaces
- IComparable
- IComparable`1
- IEquatable`1
- ISpanFormattable (Inherits: IFormattable)
- ISpanParsable`1 (Inherits: IParsable<​DateTimeOffset>)
- IUtf8SpanFormattable
- IDeserializationCallback
- ISerializable
Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC).
Fields and Constants
public static readonly
DateTimeOffset
MaxValue
Represents the greatest possible value of <see cref="T:System.DateTimeOffset" /> . This field is read-only.
public static readonly
DateTimeOffset
MinValue
Represents the earliest possible <see cref="T:System.DateTimeOffset" /> value. This field is read-only.
public static readonly
DateTimeOffset
UnixEpoch
The value of this constant is equivalent to 00:00:00.0000000 UTC, January 1, 1970, in the Gregorian calendar. <see cref="F:System.DateTimeOffset.UnixEpoch" /> defines the point in time when Unix time is equal to 0.
Properties
public
DateTime
Date
Gets a <see cref="T:System.DateTime" /> value that represents the date component of the current <see cref="T:System.DateTimeOffset" /> object.
public
DateTime
DateTime
Gets a <see cref="T:System.DateTime" /> value that represents the date and time of the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Day
Gets the day of the month represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
DayOfWeek
DayOfWeek
Gets the day of the week represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
int
DayOfYear
Gets the day of the year represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Hour
Gets the hour component of the time represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
DateTime
LocalDateTime
Gets a <see cref="T:System.DateTime" /> value that represents the local date and time of the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Microsecond
Gets the microsecond component of the time represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Millisecond
Gets the millisecond component of the time represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Minute
Gets the minute component of the time represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Month
Gets the month component of the date represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
int
Nanosecond
Gets the nanosecond component of the time represented by the current <see cref="T:System.DateTimeOffset" /> object.
public static
DateTimeOffset
Now
Gets a <see cref="T:System.DateTimeOffset" /> object that is set to the current date and time on the current computer, with the offset set to the local time's offset from Coordinated Universal Time (UTC).
public
TimeSpan
Offset
Gets the time's offset from Coordinated Universal Time (UTC).
public
int
Second
Gets the second component of the clock time represented by the current <see cref="T:System.DateTimeOffset" /> object.
public
long
Ticks
Gets the number of ticks that represents the date and time of the current <see cref="T:System.DateTimeOffset" /> object in clock time.
public
TimeSpan
TimeOfDay
Gets the time of day for the current <see cref="T:System.DateTimeOffset" /> object.
public
int
TotalOffsetMinutes
Gets the time's offset from Coordinated Universal Time (UTC) in minutes.
public
DateTime
UtcDateTime
Gets a <see cref="T:System.DateTime" /> value that represents the Coordinated Universal Time (UTC) date and time of the current <see cref="T:System.DateTimeOffset" /> object.
public static
DateTimeOffset
UtcNow
Gets a <see cref="T:System.DateTimeOffset" /> object whose date and time are set to the current Coordinated Universal Time (UTC) date and time and whose offset is <see cref="F:System.TimeSpan.Zero" /> .
public
long
UtcTicks
Gets the number of ticks that represents the date and time of the current <see cref="T:System.DateTimeOffset" /> object in Coordinated Universal Time (UTC).
public
int
Year
Gets the year component of the date represented by the current <see cref="T:System.DateTimeOffset" /> object.
Methods
public
DateTimeOffset
Add​(TimeSpan timeSpan)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified time interval to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the time interval represented by <paramref name="timeSpan" /> .
timeSpan
A <see cref="T:System.TimeSpan" /> object that represents a positive or a negative time interval.
public
DateTimeOffset
AddDays​(double days)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of whole and fractional days to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of days represented by <paramref name="days" /> .
days
A number of whole and fractional days. The number can be negative or positive.
public
DateTimeOffset
AddHours​(double hours)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of whole and fractional hours to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of hours represented by <paramref name="hours" /> .
hours
A number of whole and fractional hours. The number can be negative or positive.
public
DateTimeOffset
AddMicroseconds​(double microseconds)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of microseconds to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of whole microseconds represented by <paramref name="microseconds" /> .
microseconds
A number of whole and fractional microseconds. The number can be negative or positive.
public
DateTimeOffset
AddMilliseconds​(double milliseconds)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of milliseconds to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of whole milliseconds represented by <paramref name="milliseconds" /> .
milliseconds
A number of whole and fractional milliseconds. The number can be negative or positive.
public
DateTimeOffset
AddMinutes​(double minutes)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of whole and fractional minutes to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of minutes represented by <paramref name="minutes" /> .
minutes
A number of whole and fractional minutes. The number can be negative or positive.
public
DateTimeOffset
AddMonths​(int months)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of months to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of months represented by <paramref name="months" /> .
months
A number of whole months. The number can be negative or positive.
public
DateTimeOffset
AddSeconds​(double seconds)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of whole and fractional seconds to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of seconds represented by <paramref name="seconds" /> .
seconds
A number of whole and fractional seconds. The number can be negative or positive.
public
DateTimeOffset
AddTicks​(long ticks)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of ticks to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of ticks represented by <paramref name="ticks" /> .
ticks
A number of 100-nanosecond ticks. The number can be negative or positive.
public
DateTimeOffset
AddYears​(int years)
Returns a new <see cref="T:System.DateTimeOffset" /> object that adds a specified number of years to the value of this instance.
Returns An object whose value is the sum of the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object and the number of years represented by <paramref name="years" /> .
years
A number of years. The number can be negative or positive.
public static
int
Compare​(DateTimeOffset first,
DateTimeOffset second)
Compares two <see cref="T:System.DateTimeOffset" /> objects and indicates whether the first is earlier than the second, equal to the second, or later than the second.
Returns A signed integer that indicates whether the value of the <paramref name="first" /> parameter is earlier than, later than, or the same time as the value of the <paramref name="second" /> parameter, as the following table shows.
<list type="table">
<listheader>
<term> Return value</term>
<description> Meaning</description>
</listheader>
<item>
<term> Less than zero</term>
<description>
<paramref name="first" /> is earlier than <paramref name="second" />.</description>
</item>
<item>
<term> Zero</term>
<description>
<paramref name="first" /> is equal to <paramref name="second" />.</description>
</item>
<item>
<term> Greater than zero</term>
<description>
<paramref name="first" /> is later than <paramref name="second" />.</description>
</item>
</list>
first
The first object to compare.
second
The second object to compare.
public
int
CompareTo​(DateTimeOffset other)
Compares the current <see cref="T:System.DateTimeOffset" /> object to a specified <see cref="T:System.DateTimeOffset" /> object and indicates whether the current object is earlier than, the same as, or later than the second <see cref="T:System.DateTimeOffset" /> object.
Returns A signed integer that indicates the relationship between the current <see cref="T:System.DateTimeOffset" /> object and <paramref name="other" /> , as the following table shows.
<list type="table">
<listheader>
<term> Return Value</term>
<description> Description</description>
</listheader>
<item>
<term> Less than zero</term>
<description> The current <see cref="T:System.DateTimeOffset" /> object is earlier than <paramref name="other" />.</description>
</item>
<item>
<term> Zero</term>
<description> The current <see cref="T:System.DateTimeOffset" /> object is the same as <paramref name="other" />.</description>
</item>
<item>
<term> Greater than zero.</term>
<description> The current <see cref="T:System.DateTimeOffset" /> object is later than <paramref name="other" />.</description>
</item>
</list>
other
An object to compare with the current <see cref="T:System.DateTimeOffset" /> object.
public
bool
Equals​(DateTimeOffset other)
Determines whether the current <see cref="T:System.DateTimeOffset" /> object represents the same point in time as a specified <see cref="T:System.DateTimeOffset" /> object.
Returns <see langword="true" /> if both <see cref="T:System.DateTimeOffset" /> objects have the same <see cref="P:System.DateTimeOffset.UtcDateTime" /> value; otherwise, <see langword="false" /> .
other
An object to compare to the current <see cref="T:System.DateTimeOffset" /> object.
public static
bool
Equals​(DateTimeOffset first,
DateTimeOffset second)
Determines whether two specified <see cref="T:System.DateTimeOffset" /> objects represent the same point in time.
Returns <see langword="true" /> if the two <see cref="T:System.DateTimeOffset" /> objects have the same <see cref="P:System.DateTimeOffset.UtcDateTime" /> value; otherwise, <see langword="false" /> .
first
The first object to compare.
second
The second object to compare.
public
bool
Equals​(object obj)
Determines whether a <see cref="T:System.DateTimeOffset" /> object represents the same point in time as a specified object.
Returns <see langword="true" /> if the <paramref name="obj" /> parameter is a <see cref="T:System.DateTimeOffset" /> object and represents the same point in time as the current <see cref="T:System.DateTimeOffset" /> object; otherwise, <see langword="false" /> .
obj
The object to compare to the current <see cref="T:System.DateTimeOffset" /> object.
public
bool
EqualsExact​(DateTimeOffset other)
Determines whether the current <see cref="T:System.DateTimeOffset" /> object represents the same time and has the same offset as a specified <see cref="T:System.DateTimeOffset" /> object.
Returns <see langword="true" /> if the current <see cref="T:System.DateTimeOffset" /> object and <paramref name="other" /> have the same date and time value and the same <see cref="P:System.DateTimeOffset.Offset" /> value; otherwise, <see langword="false" /> .
other
The object to compare to the current <see cref="T:System.DateTimeOffset" /> object.
public static
DateTimeOffset
FromFileTime​(long fileTime)
Converts the specified Windows file time to an equivalent local time.
Returns An object that represents the date and time of <paramref name="fileTime" /> with the offset set to the local time offset.
fileTime
A Windows file time, expressed in ticks.
public static
DateTimeOffset
FromUnixTimeMilliseconds​(long milliseconds)
Converts a Unix time expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z to a <see cref="T:System.DateTimeOffset" /> value.
Returns A date and time value that represents the same moment in time as the Unix time.
milliseconds
A Unix time, expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative.
public static
DateTimeOffset
FromUnixTimeSeconds​(long seconds)
Converts a Unix time expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z to a <see cref="T:System.DateTimeOffset" /> value.
Returns A date and time value that represents the same moment in time as the Unix time.
seconds
A Unix time, expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative.
public
int
GetHashCode​()
Returns the hash code for the current <see cref="T:System.DateTimeOffset" /> object.
Returns A 32-bit signed integer hash code.
public static
DateTimeOffset
Parse​(ReadOnlySpan<​char> s,
IFormatProvider? provider)
Parses a span of characters into a value.
Returns The result of parsing <paramref name="s" /> .
s
The span of characters to parse.
provider
An object that provides culture-specific formatting information about <paramref name="s" /> .
public static
DateTimeOffset
Parse​(ReadOnlySpan<​char> input,
IFormatProvider? formatProvider = null,
DateTimeStyles styles = 0)
Converts the specified span representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified culture-specific format information and formatting style.
Returns An object that is equivalent to the date and time that is contained in <paramref name="input" /> as specified by <paramref name="formatProvider" /> and <paramref name="styles" /> .
input
A span containing the characters that represent a date and time to convert.
formatProvider
An object that provides culture-specific format information about <paramref name="input" /> .
styles
A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" /> . A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" /> .
public static
DateTimeOffset
Parse​(string input)
Converts the specified string representation of a date, time, and offset to its <see cref="T:System.DateTimeOffset" /> equivalent.
Returns An object that is equivalent to the date and time that is contained in <paramref name="input" /> .
input
A string that contains a date and time to convert.
public static
DateTimeOffset
Parse​(string input,
IFormatProvider? formatProvider)
Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified culture-specific format information.
Returns An object that is equivalent to the date and time that is contained in <paramref name="input" /> , as specified by <paramref name="formatProvider" /> .
input
A string that contains a date and time to convert.
formatProvider
An object that provides culture-specific format information about <paramref name="input" /> .
public static
DateTimeOffset
Parse​(string input,
IFormatProvider? formatProvider,
DateTimeStyles styles)
Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified culture-specific format information and formatting style.
Returns An object that is equivalent to the date and time that is contained in <paramref name="input" /> as specified by <paramref name="formatProvider" /> and <paramref name="styles" /> .
input
A string that contains a date and time to convert.
formatProvider
An object that provides culture-specific format information about <paramref name="input" /> .
styles
A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" /> . A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" /> .
public static
DateTimeOffset
ParseExact​(ReadOnlySpan<​char> input,
ReadOnlySpan<​char> format,
IFormatProvider? formatProvider,
DateTimeStyles styles = 0)
Converts a character span that represents a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified format, culture-specific format information, and style. The format of the date and time representation must match the specified format exactly.
Returns An object that is equivalent to the date and time that is contained in the <paramref name="input" /> parameter, as specified by the <paramref name="format" /> , <paramref name="formatProvider" /> , and <paramref name="styles" /> parameters.
input
A character span that represents a date and time.
format
A character span that contains a format specifier that defines the expected format of <paramref name="input" /> .
formatProvider
An object that provides culture-specific formatting information about <paramref name="input" /> .
styles
A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" /> .
public static
DateTimeOffset
ParseExact​(ReadOnlySpan<​char> input,
string[] formats,
IFormatProvider? formatProvider,
DateTimeStyles styles = 0)
Converts a character span that contains the string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified formats, culture-specific format information, and style. The format of the date and time representation must match one of the specified formats exactly.
Returns An object that is equivalent to the date and time that is contained in the <paramref name="input" /> parameter, as specified by the <paramref name="formats" /> , <paramref name="formatProvider" /> , and <paramref name="styles" /> parameters.
input
A character span that contains a date and time to convert.
formats
An array of format specifiers that define the expected formats of <paramref name="input" /> .
formatProvider
An object that supplies culture-specific formatting information about <paramref name="input" /> .
styles
A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" /> .
public static
DateTimeOffset
ParseExact​(string input,
string format,
IFormatProvider? formatProvider)
Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.
Returns An object that is equivalent to the date and time that is contained in <paramref name="input" /> as specified by <paramref name="format" /> and <paramref name="formatProvider" /> .
input
A string that contains a date and time to convert.
format
A format specifier that defines the expected format of <paramref name="input" /> .
formatProvider
An object that supplies culture-specific formatting information about <paramref name="input" /> .
public static
DateTimeOffset
ParseExact​(string input,
string format,
IFormatProvider? formatProvider,
DateTimeStyles styles)
Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly.
Returns An object that is equivalent to the date and time that is contained in the <paramref name="input" /> parameter, as specified by the <paramref name="format" /> , <paramref name="formatProvider" /> , and <paramref name="styles" /> parameters.
input
A string that contains a date and time to convert.
format
A format specifier that defines the expected format of <paramref name="input" /> .
formatProvider
An object that supplies culture-specific formatting information about <paramref name="input" /> .
styles
A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" /> .
public static
DateTimeOffset
ParseExact​(string input,
string[] formats,
IFormatProvider? formatProvider,
DateTimeStyles styles)
Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified formats, culture-specific format information, and style. The format of the string representation must match one of the specified formats exactly.
Returns An object that is equivalent to the date and time that is contained in the <paramref name="input" /> parameter, as specified by the <paramref name="formats" /> , <paramref name="formatProvider" /> , and <paramref name="styles" /> parameters.
input
A string that contains a date and time to convert.
formats
An array of format specifiers that define the expected formats of <paramref name="input" /> .
formatProvider
An object that supplies culture-specific formatting information about <paramref name="input" /> .
styles
A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" /> .
public
TimeSpan
Subtract​(DateTimeOffset value)
Subtracts a <see cref="T:System.DateTimeOffset" /> value that represents a specific date and time from the current <see cref="T:System.DateTimeOffset" /> object.
Returns An object that specifies the interval between the two <see cref="T:System.DateTimeOffset" /> objects.
value
An object that represents the value to subtract.
public
DateTimeOffset
Subtract​(TimeSpan value)
Subtracts a specified time interval from the current <see cref="T:System.DateTimeOffset" /> object.
Returns An object that is equal to the date and time represented by the current <see cref="T:System.DateTimeOffset" /> object, minus the time interval represented by <paramref name="value" /> .
value
The time interval to subtract.
public
long
ToFileTime​()
Converts the value of the current <see cref="T:System.DateTimeOffset" /> object to a Windows file time.
Returns The value of the current <see cref="T:System.DateTimeOffset" /> object, expressed as a Windows file time.
public
DateTimeOffset
ToLocalTime​()
Converts the current <see cref="T:System.DateTimeOffset" /> object to a <see cref="T:System.DateTimeOffset" /> object that represents the local time.
Returns An object that represents the date and time of the current <see cref="T:System.DateTimeOffset" /> object converted to local time.
public
DateTimeOffset
ToOffset​(TimeSpan offset)
Converts the value of the current <see cref="T:System.DateTimeOffset" /> object to the date and time specified by an offset value.
Returns An object that is equal to the original <see cref="T:System.DateTimeOffset" /> object (that is, their <see cref="M:System.DateTimeOffset.ToUniversalTime" /> methods return identical points in time) but whose <see cref="P:System.DateTimeOffset.Offset" /> property is set to <paramref name="offset" /> .
offset
The offset to convert the <see cref="T:System.DateTimeOffset" /> value to.
public
string
ToString​()
Converts the value of the current <see cref="T:System.DateTimeOffset" /> object to its equivalent string representation.
Returns A string representation of a <see cref="T:System.DateTimeOffset" /> object that includes the offset appended at the end of the string.
public
string
ToString​(IFormatProvider? formatProvider)
Converts the value of the current <see cref="T:System.DateTimeOffset" /> object to its equivalent string representation using the specified culture-specific formatting information.
Returns A string representation of the value of the current <see cref="T:System.DateTimeOffset" /> object, as specified by <paramref name="formatProvider" /> .
formatProvider
An object that supplies culture-specific formatting information.
public
string
ToString​(string format)
Converts the value of the current <see cref="T:System.DateTimeOffset" /> object to its equivalent string representation using the specified format.
Returns A string representation of the value of the current <see cref="T:System.DateTimeOffset" /> object, as specified by <paramref name="format" /> .
format
A format string.
public
string
ToString​(string format,
IFormatProvider formatProvider)
Converts the value of the current <see cref="T:System.DateTimeOffset" /> object to its equivalent string representation using the specified format and culture-specific format information.
Returns A string representation of the value of the current <see cref="T:System.DateTimeOffset" /> object, as specified by <paramref name="format" /> and <paramref name="formatProvider" /> .
format
A format string.
formatProvider
An object that supplies culture-specific formatting information.
public
DateTimeOffset
ToUniversalTime​()
Converts the current <see cref="T:System.DateTimeOffset" /> object to a <see cref="T:System.DateTimeOffset" /> value that represents the Coordinated Universal Time (UTC).
Returns An object that represents the date and time of the current <see cref="T:System.DateTimeOffset" /> object converted to Coordinated Universal Time (UTC).
public
long
ToUnixTimeMilliseconds​()
Returns the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.
Returns The number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.
public
long
ToUnixTimeSeconds​()
Returns the number of seconds that have elapsed since 1970-01-01T00:00:00Z.
Returns The number of seconds that have elapsed since 1970-01-01T00:00:00Z.
public
bool
TryFormat​(Span<​byte> utf8Destination,
Int32& bytesWritten,
ReadOnlySpan<​char> format = null,
IFormatProvider? formatProvider = null)
public
bool
TryFormat​(Span<​char> destination,
Int32& charsWritten,
ReadOnlySpan<​char> format = null,
IFormatProvider? formatProvider = null)
public static
bool
TryParse​(ReadOnlySpan<​char> input,
DateTimeOffset& result)
public static
bool
TryParse​(ReadOnlySpan<​char> s,
IFormatProvider? provider,
DateTimeOffset& result)
public static
bool
TryParse​(ReadOnlySpan<​char> input,
IFormatProvider? formatProvider,
DateTimeStyles styles,
DateTimeOffset& result)
public static
bool
TryParse​(string s,
IFormatProvider provider,
DateTimeOffset& result)
public static
bool
TryParse​(string input,
IFormatProvider formatProvider,
DateTimeStyles styles,
DateTimeOffset& result)
public static
bool
TryParseExact​(ReadOnlySpan<​char> input,
ReadOnlySpan<​char> format,
IFormatProvider? formatProvider,
DateTimeStyles styles,
DateTimeOffset& result)
public static
bool
TryParseExact​(ReadOnlySpan<​char> input,
string[] formats,
IFormatProvider formatProvider,
DateTimeStyles styles,
DateTimeOffset& result)
public static
bool
TryParseExact​(string input,
string format,
IFormatProvider formatProvider,
DateTimeStyles styles,
DateTimeOffset& result)
public static
bool
TryParseExact​(string input,
string[] formats,
IFormatProvider formatProvider,
DateTimeStyles styles,
DateTimeOffset& result)
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .