DateTimeConverter Constructor
Namespace: FolkerKinzel.CsvTools.Mappings.TypeConvertersAssembly: FolkerKinzel.CsvTools.Mappings (in FolkerKinzel.CsvTools.Mappings.dll) Version: 1.1.0+1263e8243dc2cd78095f678f813d7d9c52ea4315
public DateTimeConverter(
IFormatProvider? formatProvider = null,
string? format = "s",
DateTimeStyles styles = DateTimeStyles.AllowWhiteSpaces|DateTimeStyles.NoCurrentDateDefault|DateTimeStyles.RoundtripKind,
bool parseExact = false,
bool throwing = true,
DateTime defaultValue = default
)
Public Sub New (
Optional formatProvider As IFormatProvider = Nothing,
Optional format As String = "s",
Optional styles As DateTimeStyles = DateTimeStyles.AllowWhiteSpaces Or DateTimeStyles.NoCurrentDateDefault Or DateTimeStyles.RoundtripKind,
Optional parseExact As Boolean = false,
Optional throwing As Boolean = true,
Optional defaultValue As DateTime = Nothing
)
public:
DateTimeConverter(
IFormatProvider^ formatProvider = nullptr,
String^ format = L"s",
DateTimeStyles styles = DateTimeStyles::AllowWhiteSpaces|DateTimeStyles::NoCurrentDateDefault|DateTimeStyles::RoundtripKind,
bool parseExact = false,
bool throwing = true,
DateTime defaultValue = DateTime()
)
new :
?formatProvider : IFormatProvider *
?format : string *
?styles : DateTimeStyles *
?parseExact : bool *
?throwing : bool *
?defaultValue : DateTime
(* Defaults:
let _formatProvider = defaultArg formatProvider null
let _format = defaultArg format "s"
let _styles = defaultArg styles DateTimeStyles.AllowWhiteSpaces|DateTimeStyles.NoCurrentDateDefault|DateTimeStyles.RoundtripKind
let _parseExact = defaultArg parseExact false
let _throwing = defaultArg throwing true
let _defaultValue = defaultArg defaultValue new DateTime()
*)
-> DateTimeConverter
Parameters
- formatProvider IFormatProvider (Optional)
-
An IFormatProvider instance that provides culture-specific formatting
information, or null for InvariantCulture.
- format String (Optional)
-
A format string that is used for the String output of
DateTime values. If parseExact is true,
this format string is also used for parsing.
- styles DateTimeStyles (Optional)
-
A combined value of the DateTimeStyles enum that provides additional
information for parsing.
- parseExact Boolean (Optional)
-
If true the text in the CSV file must exactly match the format string specified
with format, if false, it doesn't.
- throwing Boolean (Optional)
- Sets the value of the Throwing
property.
- defaultValue DateTime (Optional)
- Sets the value of the DefaultValue
property.