Breyta

Deila með


DateOnly.ToString Method

Definition

Overloads

ToString()

Converts the value of the current DateOnly object to its equivalent string representation using the formatting conventions of the current culture. The DateOnly object will be formatted in short form.

ToString(IFormatProvider)

Converts the value of the current DateOnly object to its equivalent string representation using the specified culture-specific format information.

ToString(String)

Converts the value of the current DateOnly object to its equivalent string representation using the specified format and the formatting conventions of the current culture.

ToString(String, IFormatProvider)

Converts the value of the current DateOnly object to its equivalent string representation using the specified culture-specific format information.

ToString()

Source:
DateOnly.cs
Source:
DateOnly.cs
Source:
DateOnly.cs

Converts the value of the current DateOnly object to its equivalent string representation using the formatting conventions of the current culture. The DateOnly object will be formatted in short form.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

A string that contains the short date string representation of the current DateOnly object.

Applies to

ToString(IFormatProvider)

Source:
DateOnly.cs
Source:
DateOnly.cs
Source:
DateOnly.cs

Converts the value of the current DateOnly object to its equivalent string representation using the specified culture-specific format information.

public:
 System::String ^ ToString(IFormatProvider ^ provider);
public string ToString (IFormatProvider? provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String

Parameters

provider
IFormatProvider

An object that supplies culture-specific formatting information.

Returns

A string representation of value of the current DateOnly object as specified by provider.

Applies to

ToString(String)

Source:
DateOnly.cs
Source:
DateOnly.cs
Source:
DateOnly.cs

Converts the value of the current DateOnly object to its equivalent string representation using the specified format and the formatting conventions of the current culture.

public:
 System::String ^ ToString(System::String ^ format);
public string ToString (string? format);
override this.ToString : string -> string
Public Function ToString (format As String) As String

Parameters

format
String

A standard or custom date format string.

Returns

A string representation of value of the current DateOnly object as specified by format.

Applies to

ToString(String, IFormatProvider)

Source:
DateOnly.cs
Source:
DateOnly.cs
Source:
DateOnly.cs

Converts the value of the current DateOnly object to its equivalent string representation using the specified culture-specific format information.

public:
 virtual System::String ^ ToString(System::String ^ format, IFormatProvider ^ provider);
public string ToString (string? format, IFormatProvider? provider);
override this.ToString : string * IFormatProvider -> string
Public Function ToString (format As String, provider As IFormatProvider) As String

Parameters

format
String

A standard or custom date format string.

provider
IFormatProvider

An object that supplies culture-specific formatting information.

Returns

A string representation of value of the current DateOnly object as specified by format and provider.

Implements

Applies to