TimeSpanConverter Constructor
Namespace: FolkerKinzel.CsvTools.Mappings.TypeConvertersAssembly: FolkerKinzel.CsvTools.Mappings (in FolkerKinzel.CsvTools.Mappings.dll) Version: 1.1.0+1263e8243dc2cd78095f678f813d7d9c52ea4315
public TimeSpanConverter(
IFormatProvider? formatProvider = null,
string? format = "c",
bool parseExact = false,
TimeSpanStyles styles = TimeSpanStyles.None,
bool throwing = true,
TimeSpan defaultValue = default
)
Public Sub New (
Optional formatProvider As IFormatProvider = Nothing,
Optional format As String = "c",
Optional parseExact As Boolean = false,
Optional styles As TimeSpanStyles = TimeSpanStyles.None,
Optional throwing As Boolean = true,
Optional defaultValue As TimeSpan = Nothing
)
public:
TimeSpanConverter(
IFormatProvider^ formatProvider = nullptr,
String^ format = L"c",
bool parseExact = false,
TimeSpanStyles styles = TimeSpanStyles::None,
bool throwing = true,
TimeSpan defaultValue = TimeSpan()
)
new :
?formatProvider : IFormatProvider *
?format : string *
?parseExact : bool *
?styles : TimeSpanStyles *
?throwing : bool *
?defaultValue : TimeSpan
(* Defaults:
let _formatProvider = defaultArg formatProvider null
let _format = defaultArg format "c"
let _parseExact = defaultArg parseExact false
let _styles = defaultArg styles TimeSpanStyles.None
let _throwing = defaultArg throwing true
let _defaultValue = defaultArg defaultValue new TimeSpan()
*)
-> TimeSpanConverter
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
TimeSpan values. If the option parseExact is selected
this format string is also used 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.
- styles TimeSpanStyles (Optional)
-
A value of the TimeSpanStyles enum that provides additional information
for parsing. (Becomes evaluated only if parseExact is true.)
- throwing Boolean (Optional)
- Sets the value of the Throwing
property.
- defaultValue TimeSpan (Optional)
- Sets the value of the DefaultValue
property.