We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3604051 + c2a35fb commit 4f0e090Copy full SHA for 4f0e090
src/OutputFormatters/CsvOutputFormatter.cs
@@ -182,7 +182,11 @@ public class CustomDoubleConverter : DoubleConverter
182
{
183
public override string ConvertToString(object value, IWriterRow row, MemberMapData memberMapData)
184
185
- double number = (double)value;
186
- return number.ToString("F8", CultureInfo.InvariantCulture);
+ return value switch
+ {
187
+ null => string.Empty,
188
+ double number => number.ToString("F8", CultureInfo.InvariantCulture),
189
+ _ => throw new InvalidOperationException("The value is not a double.")
190
+ };
191
}
192
0 commit comments