GregorianDateToString Method (String, IFormatProvider) |
Converts the value of this instance to its equivalent string
representation using the specified format and culture-specific format information.
Namespace:
AGI.Foundation.Time
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public string ToString(
string format,
IFormatProvider provider
)
Public Function ToString (
format As String,
provider As IFormatProvider
) As String
public:
String^ ToString(
String^ format,
IFormatProvider^ provider
)
member ToString :
format : string *
provider : IFormatProvider -> string
Parameters
- format
- Type: SystemString
A format string. - provider
- Type: SystemIFormatProvider
An IFormatProvider that supplies culture-specific formatting information.
Return Value
Type:
StringA string representation of value of this instance as specified by
format and
provider.
Exceptions Exception | Condition |
---|
FormatException |
Thrown if the length of format is 1,
and it is not one of the format specifier characters defined for DateTimeFormatInfo,
or if format does not contain a valid custom format pattern.
|
See Also