diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
index 4af7ba4f7a..1248de8294 100644
--- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
@@ -1170,7 +1170,7 @@ private void GenerateToString()
/// String representation.
public override string ToString()
{{
- return ToString(""g"");
+ return ToString(null, null);
}}
///
@@ -1180,7 +1180,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{{
- return ToString(""g"", provider);
+ return ToString(null, provider);
}}
///
@@ -1191,7 +1191,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}}
///
@@ -1277,7 +1277,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{{
- return ToString(""g"", provider);
+ return ToString(null, provider);
}}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
index 8a03f3021f..65e192f2c1 100644
--- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
@@ -662,7 +662,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString(""g"", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString(""G"", formatProvider), quantity.ToString(null, formatProvider));
}}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AbsorbedDoseOfIonizingRadiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AbsorbedDoseOfIonizingRadiationTestsBase.g.cs
index 2cf5a6ae4f..26a878427d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AbsorbedDoseOfIonizingRadiationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AbsorbedDoseOfIonizingRadiationTestsBase.g.cs
@@ -1279,7 +1279,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
index ccf828bc39..63b086c6c6 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
@@ -1289,7 +1289,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs
index 0c22041914..411cf680e3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs
@@ -1042,7 +1042,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs
index 8ce6aef402..6bcda2f8c4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs
@@ -587,7 +587,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
index b633c0a969..ddf3616aa1 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
@@ -1518,7 +1518,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs
index 059f98f19f..d2ec853351 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs
index 25cab7d731..ccd3c7e761 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs
@@ -635,7 +635,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs
index 62719f70c6..e201892b46 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs
@@ -570,7 +570,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs
index 3d136712c2..56fed36471 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs
@@ -801,7 +801,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
index 15401c766f..6f67d1c189 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
@@ -1579,7 +1579,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
index 7abc5e1663..97d8ea7d6a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
@@ -1709,7 +1709,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs
index 3eaab68d55..8d53bb7b45 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs
index ca068f97a1..74fd690b22 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs
@@ -672,7 +672,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs
index a558745177..3ac807c0c4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs
@@ -657,7 +657,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs
index 546fa5adee..2246da04dc 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs
@@ -862,7 +862,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
index 0d2dabc209..9e4ed7ff8c 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
@@ -2603,7 +2603,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs
index 5d83f0ada0..322bb54505 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs
@@ -2055,7 +2055,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs
index 672b2af153..48906046a1 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs
@@ -877,7 +877,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
index 8cf07acc1d..f50a20dad0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
@@ -583,7 +583,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs
index 856fb9341d..6a81571346 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs
index 0853f70ce0..5a10a078e5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs
@@ -872,7 +872,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs
index ded3043a3b..4b2ff1f6b1 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs
@@ -620,7 +620,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs
index 67b7009d61..2a6583079b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs
@@ -657,7 +657,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs
index ebf2e0c22c..7d2187e0f9 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs
index cd55d36900..5a83c9ca72 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs
@@ -694,7 +694,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs
index 91527ffa9b..0c6eeb9a58 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs
@@ -746,7 +746,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs
index fcf230bf21..690ea5b462 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs
index eec02a1d0d..2d5b3725ff 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs
@@ -620,7 +620,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs
index feff1ed8e6..19742ba3d8 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs
@@ -598,7 +598,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs
index 43dd7a3a6f..2fcead6561 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs
@@ -1087,7 +1087,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs
index 17e942eacf..78d0e1936d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs
@@ -598,7 +598,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs
index bce1c84c45..2daa81517b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs
@@ -757,7 +757,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs
index 1a590c84cc..b3991642f0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs
@@ -672,7 +672,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
index 3563218896..10352509e2 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
@@ -909,7 +909,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs
index 4b19877780..54a386e7d6 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs
index badd24ccc8..0bcf088a12 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs
@@ -879,7 +879,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs
index fe5f52258e..8af5cb4921 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs
@@ -2397,7 +2397,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs
index 323b521110..13fa788561 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs
@@ -694,7 +694,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
index 596555b6ec..fa294e3025 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
@@ -1086,7 +1086,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs
index 268cabf80d..836a6a1618 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs
@@ -2015,7 +2015,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs
index 502bd48787..70caaca656 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs
@@ -1404,7 +1404,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs
index 319430b706..afafae555f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs
@@ -1088,7 +1088,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs
index ac549de55b..66725281c5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs
@@ -583,7 +583,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
index 494eb55578..42dfbea53f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
@@ -1125,7 +1125,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs
index 052f28d515..f579a9bfa2 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs
@@ -836,7 +836,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs
index 9ab14fce98..c9a75b1ab0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs
@@ -561,7 +561,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs
index ae7f6dcbd1..6615c7a233 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs
@@ -894,7 +894,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
index e5ec7cc4c1..f955deed1b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
@@ -1111,7 +1111,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
index f1bd6d379f..2912b6e3d5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
@@ -909,7 +909,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
index 10213a552a..f7f6f25594 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
@@ -768,7 +768,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs
index a976a8bb3b..aee273eb81 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs
@@ -1106,7 +1106,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs
index 14cc3b305e..79434dde3f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs
@@ -960,7 +960,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs
index 657a7c90ac..6a0db2a2a4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
index 82a0d28406..4709f14641 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
@@ -3087,7 +3087,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs
index 4d86075397..7223411046 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs
@@ -513,7 +513,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs
index e7d8cb0aac..2fb3cb4715 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs
@@ -1101,7 +1101,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs
index 7a86aeeb21..7e95ed9c15 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs
@@ -1250,7 +1250,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs
index 57b54cb1ea..5753e5396e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs
@@ -805,7 +805,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs
index 9218c51871..2ad218bfd9 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs
@@ -909,7 +909,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs
index 457267697c..b75595c081 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs
index ef766cab6e..68cec786e8 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs
index 07f5d5d420..c8ceb52869 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs
@@ -657,7 +657,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs
index f60e920cb2..cb894b7d55 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs
index 4e70395a9d..ea0c1ead65 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
index 890693ba84..326bb8d522 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
@@ -2344,7 +2344,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
index 9d12834087..f951053fcd 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
@@ -1898,7 +1898,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs
index 672f5e366b..694fa54e1f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs
@@ -879,7 +879,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
index 44016bf9d5..eebf93d9ed 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
@@ -1347,7 +1347,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
index 54c888e143..557e88fd0a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
@@ -1471,7 +1471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
index 16e3148fec..1856a1d0ae 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
@@ -2542,7 +2542,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolalityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolalityTestsBase.g.cs
index 84679b9900..a1ab73c241 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolalityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolalityTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs
index 9689335f35..0a676afff3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs
index aea85e6e1d..0589bb00ea 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs
index dacdbd8693..90c03c7871 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs
@@ -768,7 +768,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
index e17e6832be..87d64866a8 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
@@ -1204,7 +1204,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs
index f9ba944d05..01b6056687 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs
@@ -1034,7 +1034,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs
index 6b02284562..03a1cc9a42 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs
index 72f1171615..c40bf7b596 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs
index f5c67e55bc..d2772599a3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs
@@ -620,7 +620,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
index ba86c2a5f3..243ddf0124 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
@@ -1975,7 +1975,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs
index 0681cd4c85..487cef81b9 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs
@@ -537,7 +537,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs
index 3e08d30a37..067dbaa694 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs
@@ -1440,7 +1440,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs
index a07a6f2264..457e34fb0b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs
@@ -1821,7 +1821,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
index da53e36681..597fba7dfc 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
@@ -3290,7 +3290,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs
index 1859bb537c..a88920680a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs
@@ -753,7 +753,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs
index 68098de89a..89242ef3a3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs
@@ -731,7 +731,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RadioactivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RadioactivityTestsBase.g.cs
index b4ae358bd6..ee3b3ef0bd 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RadioactivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RadioactivityTestsBase.g.cs
@@ -2028,7 +2028,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs
index a3e270d64c..7358d83fc4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs
@@ -509,7 +509,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs
index f2b2537b41..27b61e39ca 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs
@@ -657,7 +657,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs
index 19f634021c..be2c080f51 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs
index 51ad45533c..d80cf6c21e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs
@@ -583,7 +583,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs
index dc950edd10..2ec2be8b40 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs
@@ -842,7 +842,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs
index 83c8be3752..05c77e6c60 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs
@@ -1045,7 +1045,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs
index 0c5051bdcd..9770a3da60 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs
index d94fd13f98..63853e9a90 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs
@@ -607,7 +607,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
index df53fd9a1b..1c0cde6889 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
@@ -1348,7 +1348,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs
index 875a6b9e7e..b9149031fb 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs
@@ -812,7 +812,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs
index f837417644..e0294fc5fe 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs
@@ -3140,7 +3140,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs
index d9948dee53..552bf04f6a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs
index b3012c2141..f156035f35 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs
index 660a5ff448..5009f7f1ca 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs
@@ -1545,7 +1545,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
index 06c5f28ef1..96a28d5348 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
@@ -792,7 +792,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs
index df1ab98f26..36cca7e80e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs
@@ -583,7 +583,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs
index 01e029792a..7bcbfef68c 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs
@@ -546,7 +546,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
index d220fc45da..9eae6be49e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
@@ -1064,7 +1064,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
index a17add7695..b9380bd41d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
@@ -2376,7 +2376,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs
index 82bc15625a..c2e430333a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs
@@ -768,7 +768,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
index a10c7740b4..4afb8b5cc3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
@@ -805,7 +805,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs
index 00d7de586d..f11977c1b4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs
@@ -768,7 +768,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs
index 737ae74c38..8ef845aca4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs
@@ -583,7 +583,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs
index c52930c3fd..81026bf346 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs
@@ -793,7 +793,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs
index e5fe54321e..ed4138ba78 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs
@@ -509,7 +509,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs
index a07a520de2..4ff4685026 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs
@@ -657,7 +657,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs
index 41a2b79231..1349746299 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs
@@ -1284,7 +1284,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
index 25da2e03ba..e92e79d831 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
@@ -1432,7 +1432,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs
index 0cc9010b7b..af7885484b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs
index 7f9d58c639..b0b322b543 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs
@@ -471,7 +471,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
index b37700c6ca..ed95c3e1b8 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
@@ -1199,7 +1199,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs
index 768ec2a3b8..20f00728d4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs
@@ -509,7 +509,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
index dfa3d5f507..9986be1820 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
@@ -5226,7 +5226,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs
index c88eee47a4..00529e8ef7 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs
@@ -768,7 +768,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
index d837005cf1..c007610bb0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
@@ -3453,7 +3453,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs
index 74f6232c94..3258232b08 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs
@@ -768,7 +768,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs
index ab18ce4422..4ea94b4737 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs
@@ -801,7 +801,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString("G", formatProvider), quantity.ToString(null, formatProvider));
}
[Theory]
diff --git a/UnitsNet.Tests/QuantityFormatterTests.cs b/UnitsNet.Tests/QuantityFormatterTests.cs
index 06628d5b44..721ccaa966 100644
--- a/UnitsNet.Tests/QuantityFormatterTests.cs
+++ b/UnitsNet.Tests/QuantityFormatterTests.cs
@@ -1,6 +1,7 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+using System;
using System.Globalization;
using Xunit;
@@ -9,22 +10,22 @@ namespace UnitsNet.Tests
public class QuantityFormatterTests
{
[Theory]
- [InlineData("C")]
- [InlineData("C0")]
- [InlineData("C1")]
- [InlineData("C2")]
- [InlineData("C3")]
- [InlineData("C4")]
- [InlineData("C5")]
- [InlineData("C6")]
- [InlineData("c")]
- [InlineData("c0")]
- [InlineData("c1")]
- [InlineData("c2")]
- [InlineData("c3")]
- [InlineData("c4")]
- [InlineData("c5")]
- [InlineData("c6")]
+ [InlineData("G")]
+ [InlineData("G0")]
+ [InlineData("G1")]
+ [InlineData("G2")]
+ [InlineData("G3")]
+ [InlineData("G4")]
+ [InlineData("G5")]
+ [InlineData("G6")]
+ [InlineData("g")]
+ [InlineData("g0")]
+ [InlineData("g1")]
+ [InlineData("g2")]
+ [InlineData("g3")]
+ [InlineData("g4")]
+ [InlineData("g5")]
+ [InlineData("g6")]
[InlineData("E")]
[InlineData("E0")]
[InlineData("E1")]
@@ -73,22 +74,6 @@ public class QuantityFormatterTests
[InlineData("n4")]
[InlineData("n5")]
[InlineData("n6")]
- [InlineData("P")]
- [InlineData("P0")]
- [InlineData("P1")]
- [InlineData("P2")]
- [InlineData("P3")]
- [InlineData("P4")]
- [InlineData("P5")]
- [InlineData("P6")]
- [InlineData("p")]
- [InlineData("p0")]
- [InlineData("p1")]
- [InlineData("p2")]
- [InlineData("p3")]
- [InlineData("p4")]
- [InlineData("p5")]
- [InlineData("p6")]
[InlineData("R")]
[InlineData("R0")]
[InlineData("R1")]
@@ -112,7 +97,52 @@ public static void StandardNumericFormatStrings_Equals_ValueWithFormatStringAndA
var expected = string.Format(CultureInfo.CurrentCulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
Assert.Equal(expected, QuantityFormatter.Format(length, format));
}
-
+
+ [Theory]
+ [InlineData("U")]
+ [InlineData("u")]
+ [InlineData("V")]
+ [InlineData("v")]
+ [InlineData("Q")]
+ [InlineData("q")]
+ [InlineData("C")]
+ [InlineData("C0")]
+ [InlineData("C1")]
+ [InlineData("C2")]
+ [InlineData("C3")]
+ [InlineData("C4")]
+ [InlineData("C5")]
+ [InlineData("C6")]
+ [InlineData("c")]
+ [InlineData("c0")]
+ [InlineData("c1")]
+ [InlineData("c2")]
+ [InlineData("c3")]
+ [InlineData("c4")]
+ [InlineData("c5")]
+ [InlineData("c6")]
+ [InlineData("P")]
+ [InlineData("P0")]
+ [InlineData("P1")]
+ [InlineData("P2")]
+ [InlineData("P3")]
+ [InlineData("P4")]
+ [InlineData("P5")]
+ [InlineData("P6")]
+ [InlineData("p")]
+ [InlineData("p0")]
+ [InlineData("p1")]
+ [InlineData("p2")]
+ [InlineData("p3")]
+ [InlineData("p4")]
+ [InlineData("p5")]
+ [InlineData("p6")]
+ public static void Format_WithUnsupportedFormatString_ThrowsFormatException(string format)
+ {
+ var length = Length.FromMeters(123456789.987654321);
+ Assert.Throws(() => QuantityFormatter.Format(length, format));
+ }
+
[Fact]
public static void StandardNumericFormatStringsAsPartOfLongerFormatStringsWork()
{
diff --git a/UnitsNet.Tests/QuantityIFormattableTests.cs b/UnitsNet.Tests/QuantityIFormattableTests.cs
index 81237fabb1..9d83343037 100644
--- a/UnitsNet.Tests/QuantityIFormattableTests.cs
+++ b/UnitsNet.Tests/QuantityIFormattableTests.cs
@@ -14,14 +14,14 @@ public class QuantityIFormattableTests
[Fact]
public void GFormatStringEqualsToString()
{
- Assert.Equal(MyLength.ToString("g"), MyLength.ToString());
+ Assert.Equal(MyLength.ToString("G"), MyLength.ToString());
}
[Fact]
public void EmptyOrNullFormatStringEqualsGFormat()
{
- Assert.Equal(MyLength.ToString("g"), MyLength.ToString(string.Empty));
- Assert.Equal(MyLength.ToString("g"), MyLength.ToString(format: null!));
+ Assert.Equal(MyLength.ToString("G"), MyLength.ToString(string.Empty));
+ Assert.Equal(MyLength.ToString("G"), MyLength.ToString(format: null));
}
[Fact]
@@ -41,18 +41,6 @@ public void AFormatWithInvalidIndexThrowsFormatException()
Assert.Throws(() => MyLength.ToString("a100"));
}
- [Fact]
- public void QFormatEqualsQuantityName()
- {
- Assert.Equal(Length.Info.Name, MyLength.ToString("q"));
- }
-
- [Fact]
- public void UFormatEqualsUnitToString()
- {
- Assert.Equal(MyLength.Unit.ToString(), MyLength.ToString("u"));
- }
-
[Fact]
public void UnsupportedFormatStringThrowsException()
{
diff --git a/UnitsNet.Tests/QuantityTests.ToString.cs b/UnitsNet.Tests/QuantityTests.ToString.cs
index 5c9eea0fd2..60c9ff5656 100644
--- a/UnitsNet.Tests/QuantityTests.ToString.cs
+++ b/UnitsNet.Tests/QuantityTests.ToString.cs
@@ -18,9 +18,9 @@ public void ReturnsTheOriginalValueAndUnit()
{
var culture = CultureInfo.InvariantCulture;
Assert.Equal("5 kg", Mass.FromKilograms(5).ToString(culture));
- Assert.Equal("5,000 g", Mass.FromGrams(5000).ToString(culture));
- Assert.Equal("1e-04 long tn", Mass.FromLongTons(1e-4).ToString(culture));
- Assert.Equal("3.46e-04 dN/m", ForcePerLength.FromDecinewtonsPerMeter(0.00034567).ToString(culture));
+ Assert.Equal("5000 g", Mass.FromGrams(5000).ToString(culture));
+ Assert.Equal("0.0001 long tn", Mass.FromLongTons(1e-4).ToString(culture));
+ Assert.Equal("0.00034567 dN/m", ForcePerLength.FromDecinewtonsPerMeter(0.00034567).ToString(culture));
Assert.Equal("0.0069 dB", Level.FromDecibels(0.0069).ToString(culture));
Assert.Equal("0.011 kWh/kg", SpecificEnergy.FromKilowattHoursPerKilogram(0.011).ToString(culture));
// Assert.Equal("0.1 MJ/kg·C", SpecificEntropy.FromMegajoulesPerKilogramDegreeCelsius(0.1).ToString(culture));
diff --git a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs
index fa1de0784a..7f360f8c08 100644
--- a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs
+++ b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs
@@ -20,26 +20,51 @@ public class UnitAbbreviationsCacheTests
private static readonly IFormatProvider NorwegianCulture = CultureInfo.GetCultureInfo(NorwegianCultureName);
private static readonly IFormatProvider RussianCulture = CultureInfo.GetCultureInfo(RussianCultureName);
- // The default, parameterless ToString() method uses 2 sigifnificant digits after the radix point.
+ // The default, parameterless ToString() method represents the result with all significant digits, without a group separator.
[Theory]
+ #if NET
+ [InlineData(double.MinValue, "-1.7976931348623157E+308 m")]
+ #else
+ [InlineData(double.MinValue, "-1.79769313486232E+308 m")]
+ #endif
+ [InlineData(-0.819999999999, "-0.819999999999 m")]
+ [InlineData(-0.111234, "-0.111234 m")]
+ [InlineData(-0.1, "-0.1 m")]
+ [InlineData(-0.0000012345, "-1.2345E-06 m")]
+ [InlineData(-0.000001, "-1E-06 m")]
[InlineData(0, "0 m")]
+ [InlineData(0.000001, "1E-06 m")]
+ [InlineData(0.0000012345, "1.2345E-06 m")]
[InlineData(0.1, "0.1 m")]
- [InlineData(0.11, "0.11 m")]
- [InlineData(0.111234, "0.11 m")]
- [InlineData(0.115, "0.12 m")]
+ [InlineData(0.111234, "0.111234 m")]
+ [InlineData(0.819999999999, "0.819999999999 m")]
+ #if NET
+ [InlineData(double.MaxValue, "1.7976931348623157E+308 m")]
+ #else
+ [InlineData(double.MaxValue, "1.79769313486232E+308 m")]
+ #endif
public void DefaultToStringFormatting(double value, string expected)
{
- string actual = Length.FromMeters(value).ToUnit(LengthUnit.Meter).ToString(AmericanCulture);
+ string actual = Length.FromMeters(value).ToString(AmericanCulture);
Assert.Equal(expected, actual);
}
- private enum CustomUnit
+ [Theory]
+ [InlineData("de-DE")]
+ [InlineData("da-DK")]
+ [InlineData("es-AR")]
+ [InlineData("es-ES")]
+ [InlineData("it-IT")]
+ [InlineData("en-CA")]
+ [InlineData("en-US")]
+ [InlineData("ar-EG")]
+ [InlineData("en-GB")]
+ [InlineData("es-MX")]
+ public void RadixPointCultureFormatting(string cultureName)
{
- // ReSharper disable UnusedMember.Local
- Undefined = 0,
- Unit1,
- Unit2
- // ReSharper restore UnusedMember.Local
+ CultureInfo culture = GetCulture(cultureName);
+ string ds = culture.NumberFormat.NumberDecimalSeparator;
+ Assert.Equal($"0{ds}12 m", Length.FromMeters(0.12).ToString(culture));
}
[Theory]
@@ -53,11 +78,30 @@ private enum CustomUnit
[InlineData("ar-EG")]
[InlineData("en-GB")]
[InlineData("es-MX")]
- public void RadixPointCultureFormatting(string cultureName)
+ public void ToString_SFormat_DecimalSeparator_ForCulture(string cultureName)
{
CultureInfo culture = GetCulture(cultureName);
string ds = culture.NumberFormat.NumberDecimalSeparator;
- Assert.Equal($"0{ds}12 m", Length.FromMeters(0.12).ToUnit(LengthUnit.Meter).ToString(culture));
+ Assert.Equal($"0{ds}12 m", Length.FromMeters(0.12).ToString("s2", culture));
+ }
+
+ [Theory]
+ [InlineData("en-CA")]
+ [InlineData("en-GB")]
+ [InlineData("en-US")]
+ [InlineData("ar-EG")]
+ [InlineData("es-MX")]
+ [InlineData("nn-NO")]
+ [InlineData("fr-FR")]
+ [InlineData("de-DE")]
+ [InlineData("da-DK")]
+ [InlineData("es-AR")]
+ [InlineData("es-ES")]
+ [InlineData("it-IT")]
+ public void ToString_WithCultureWithoutGroupingSeparator(string cultureName)
+ {
+ CultureInfo culture = GetCulture(cultureName);
+ Assert.Equal("1111 m", Length.FromMeters(1111).ToString(culture));
}
[Theory]
@@ -73,33 +117,79 @@ public void RadixPointCultureFormatting(string cultureName)
[InlineData("es-AR")]
[InlineData("es-ES")]
[InlineData("it-IT")]
- public void DigitGroupingCultureFormatting(string cultureName)
+ public void ToString_SFormat_UsesGroupingSeparator_ForCulture(string cultureName)
{
CultureInfo culture = GetCulture(cultureName);
string gs = culture.NumberFormat.NumberGroupSeparator;
- Assert.Equal($"1{gs}111 m", Length.FromMeters(1111).ToUnit(LengthUnit.Meter).ToString(culture));
+ Assert.Equal($"1{gs}111 m", Length.FromMeters(1111).ToString("S", culture));
+ }
+
+ [Theory]
+ [InlineData("en-CA")]
+ [InlineData("en-GB")]
+ [InlineData("en-US")]
+ [InlineData("ar-EG")]
+ [InlineData("es-MX")]
+ [InlineData("nn-NO")]
+ [InlineData("fr-FR")]
+ [InlineData("de-DE")]
+ [InlineData("da-DK")]
+ [InlineData("es-AR")]
+ [InlineData("es-ES")]
+ [InlineData("it-IT")]
+ public void FeetInches_UseGroupingSeparator_ForCulture(string cultureName)
+ {
+ CultureInfo culture = GetCulture(cultureName);
+ string gs = culture.NumberFormat.NumberGroupSeparator;
+
+ // Feet/Inch and Stone/Pound combinations are only used (customarily) in the US, UK and maybe Ireland - all English speaking countries.
+ // FeetInches returns a whole number of feet, with the remainder expressed (rounded) in inches. Same for StonePounds.
+ Assert.Equal($"3{gs}333 st 7 lb", Mass.FromStonePounds(3333, 7).StonePounds.ToString(culture));
+ }
+
+ [Theory]
+ [InlineData("en-CA")]
+ [InlineData("en-GB")]
+ [InlineData("en-US")]
+ [InlineData("ar-EG")]
+ [InlineData("es-MX")]
+ [InlineData("nn-NO")]
+ [InlineData("fr-FR")]
+ [InlineData("de-DE")]
+ [InlineData("da-DK")]
+ [InlineData("es-AR")]
+ [InlineData("es-ES")]
+ [InlineData("it-IT")]
+ public void StonePounds_UseGroupingSeparator_ForCulture(string cultureName)
+ {
+ CultureInfo culture = GetCulture(cultureName);
+ string gs = culture.NumberFormat.NumberGroupSeparator;
// Feet/Inch and Stone/Pound combinations are only used (customarily) in the US, UK and maybe Ireland - all English speaking countries.
// FeetInches returns a whole number of feet, with the remainder expressed (rounded) in inches. Same for StonePounds.
- Assert.Equal($"2{gs}222 ft 3 in",
- Length.FromFeetInches(2222, 3).FeetInches.ToString(culture));
- Assert.Equal($"3{gs}333 st 7 lb",
- Mass.FromStonePounds(3333, 7).StonePounds.ToString(culture));
+ Assert.Equal($"3{gs}333 st 7 lb", Mass.FromStonePounds(3333, 7).StonePounds.ToString(culture));
}
// Due to rounding, the values will result in the same string representation regardless of the number of significant digits (up to a certain point)
[Theory]
+ [InlineData(-0.819999999999, "S", "-0.819999999999 m")]
+ [InlineData(-0.819999999999, "s2", "-0.82 m")]
+ [InlineData(-0.819999999999, "s4", "-0.82 m")]
+ [InlineData(-0.8, "s4", "-0.8 m")]
+ [InlineData(0.819999999999, "S", "0.819999999999 m")]
+ [InlineData(0.819999999999, "s", "0.819999999999 m")]
[InlineData(0.819999999999, "s2", "0.82 m")]
[InlineData(0.819999999999, "s4", "0.82 m")]
+ [InlineData(0.8, "s4", "0.8 m")]
[InlineData(0.00299999999, "s2", "0.003 m")]
[InlineData(0.00299999999, "s4", "0.003 m")]
[InlineData(0.0003000001, "s2", "3e-04 m")]
[InlineData(0.0003000001, "s4", "3e-04 m")]
- public void RoundingErrorsWithSignificantDigitsAfterRadixFormatting(double value,
+ public void ToString_SFormat_RoundsToSignificantDigitsAfterRadix(double value,
string significantDigitsAfterRadixFormatString, string expected)
{
- string actual = Length.FromMeters(value).ToUnit(LengthUnit.Meter).ToString(significantDigitsAfterRadixFormatString, AmericanCulture);
+ string actual = Length.FromMeters(value).ToString(significantDigitsAfterRadixFormatString, AmericanCulture);
Assert.Equal(expected, actual);
}
@@ -109,9 +199,9 @@ public void RoundingErrorsWithSignificantDigitsAfterRadixFormatting(double value
[InlineData(1.23e-120, "1.23e-120 m")]
[InlineData(0.0000111, "1.11e-05 m")]
[InlineData(1.99e-4, "1.99e-04 m")]
- public void ScientificNotationLowerInterval(double value, string expected)
+ public void ToString_SFormat_BelowMilli_UsesScientificNotation(double value, string expected)
{
- string actual = Length.FromMeters(value).ToUnit(LengthUnit.Meter).ToString(AmericanCulture);
+ string actual = Length.FromMeters(value).ToString("s2", AmericanCulture);
Assert.Equal(expected, actual);
}
@@ -120,9 +210,9 @@ public void ScientificNotationLowerInterval(double value, string expected)
[InlineData(1e-3, "0.001 m")]
[InlineData(1.1, "1.1 m")]
[InlineData(999.99, "999.99 m")]
- public void FixedPointNotationIntervalFormatting(double value, string expected)
+ public void ToString_SFormat_BetweenMilliAndKilo_UsesFixedPointFormat(double value, string expected)
{
- string actual = Length.FromMeters(value).ToUnit(LengthUnit.Meter).ToString(AmericanCulture);
+ string actual = Length.FromMeters(value).ToString("s2",AmericanCulture);
Assert.Equal(expected, actual);
}
@@ -132,9 +222,9 @@ public void FixedPointNotationIntervalFormatting(double value, string expected)
[InlineData(11000, "11,000 m")]
[InlineData(111000, "111,000 m")]
[InlineData(999999.99, "999,999.99 m")]
- public void FixedPointNotationWithDigitGroupingIntervalFormatting(double value, string expected)
+ public void ToString_SFormat_From1e3To1e5_UsesFixedPointFormatWithDigitGrouping(double value, string expected)
{
- string actual = Length.FromMeters(value).ToUnit(LengthUnit.Meter).ToString(AmericanCulture);
+ string actual = Length.FromMeters(value).ToString("s2",AmericanCulture);
Assert.Equal(expected, actual);
}
@@ -143,9 +233,9 @@ public void FixedPointNotationWithDigitGroupingIntervalFormatting(double value,
[InlineData(1e6, "1e+06 m")]
[InlineData(11100000, "1.11e+07 m")]
[InlineData(double.MaxValue, "1.8e+308 m")]
- public void ScientificNotationUpperIntervalFormatting(double value, string expected)
+ public void ToString_SFormat_Above1e6_UsesScientificNotation(double value, string expected)
{
- string actual = Length.FromMeters(value).ToUnit(LengthUnit.Meter).ToString(AmericanCulture);
+ string actual = Length.FromMeters(value).ToString("s2",AmericanCulture);
Assert.Equal(expected, actual);
}
@@ -207,7 +297,7 @@ public void ToString_WithRussianCulture()
public void GetDefaultAbbreviationThrowsNotImplementedExceptionIfNoneExist()
{
var unitAbbreviationCache = new UnitAbbreviationsCache();
- Assert.Throws(() => unitAbbreviationCache.GetDefaultAbbreviation(CustomUnit.Unit1));
+ Assert.Throws(() => unitAbbreviationCache.GetDefaultAbbreviation(HowMuchUnit.AShitTon));
}
[Fact]
@@ -220,10 +310,10 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture()
// CultureInfo.CurrentCulture = zuluCulture;
var abbreviationsCache = new UnitAbbreviationsCache();
- abbreviationsCache.MapUnitToAbbreviation(CustomUnit.Unit1, AmericanCulture, "US english abbreviation for Unit1");
+ abbreviationsCache.MapUnitToAbbreviation(HowMuchUnit.AShitTon, AmericanCulture, "US english abbreviation for Unit1");
// Act
- string abbreviation = abbreviationsCache.GetDefaultAbbreviation(CustomUnit.Unit1, zuluCulture);
+ string abbreviation = abbreviationsCache.GetDefaultAbbreviation(HowMuchUnit.AShitTon, zuluCulture);
// Assert
Assert.Equal("US english abbreviation for Unit1", abbreviation);
diff --git a/UnitsNet/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs b/UnitsNet/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs
index 5d081e8a87..6de8715c97 100644
--- a/UnitsNet/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs
@@ -1042,7 +1042,7 @@ public AbsorbedDoseOfIonizingRadiation ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1052,7 +1052,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1063,7 +1063,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1144,7 +1144,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
index 01dd5bee4a..acbaea8e17 100644
--- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
@@ -1047,7 +1047,7 @@ public Acceleration ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1057,7 +1057,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1068,7 +1068,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1149,7 +1149,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
index 5a1642ba65..18acb1bddd 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
@@ -1101,7 +1101,7 @@ public AmountOfSubstance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1111,7 +1111,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1122,7 +1122,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1203,7 +1203,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
index 736e31a4e9..9f69251e55 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
@@ -831,7 +831,7 @@ public AmplitudeRatio ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -841,7 +841,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -852,7 +852,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -933,7 +933,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs
index d340ccdf90..fe71f24d59 100644
--- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs
@@ -1051,7 +1051,7 @@ public Angle ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1061,7 +1061,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1072,7 +1072,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1153,7 +1153,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
index d40eadf5f7..f01926747b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
@@ -805,7 +805,7 @@ public ApparentEnergy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -815,7 +815,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -826,7 +826,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -907,7 +907,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
index 1060a2d784..64ed9e789f 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
@@ -859,7 +859,7 @@ public ApparentPower ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -869,7 +869,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -880,7 +880,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -961,7 +961,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs
index 36be222a43..478beca76e 100644
--- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs
@@ -1138,7 +1138,7 @@ public Area ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1148,7 +1148,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1159,7 +1159,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1240,7 +1240,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
index 31c085560c..1133ad130a 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
@@ -821,7 +821,7 @@ public AreaDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -831,7 +831,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -842,7 +842,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -923,7 +923,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
index 652369dd96..ed1d3e249c 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
@@ -882,7 +882,7 @@ public AreaMomentOfInertia ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -892,7 +892,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -903,7 +903,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -984,7 +984,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
index 7f5e8a6008..d980df4a6d 100644
--- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
@@ -1222,7 +1222,7 @@ public BitRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1232,7 +1232,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1243,7 +1243,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1324,7 +1324,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
index c3e6bb48d2..bdabac25bc 100644
--- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
@@ -834,7 +834,7 @@ public BrakeSpecificFuelConsumption ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -844,7 +844,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -855,7 +855,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -936,7 +936,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
index 4ca771b9fe..8a7224e1b4 100644
--- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
@@ -880,7 +880,7 @@ public Capacitance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -890,7 +890,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -901,7 +901,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -982,7 +982,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
index 3b7fb485b9..8d37760e9b 100644
--- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
@@ -881,7 +881,7 @@ public CoefficientOfThermalExpansion ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -891,7 +891,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -902,7 +902,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -983,7 +983,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs
index 2e02c099ab..a00e9f0346 100644
--- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs
@@ -877,7 +877,7 @@ public Compressibility ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -887,7 +887,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -898,7 +898,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -979,7 +979,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs
index 10d295a9f3..c79a3fa833 100644
--- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs
@@ -1833,7 +1833,7 @@ public Density ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1843,7 +1843,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1854,7 +1854,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1935,7 +1935,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs
index 9a5ca389d7..e565614d52 100644
--- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs
@@ -1074,7 +1074,7 @@ public Duration ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1084,7 +1084,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1095,7 +1095,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1176,7 +1176,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
index f1a5ce7d42..efabe3be06 100644
--- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
@@ -957,7 +957,7 @@ public DynamicViscosity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -967,7 +967,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -978,7 +978,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1059,7 +1059,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
index 4e2983f6e9..0aa9579e7c 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
@@ -823,7 +823,7 @@ public ElectricAdmittance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -833,7 +833,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -844,7 +844,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -925,7 +925,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
index aec4884ea4..c7b42b9305 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
@@ -982,7 +982,7 @@ public ElectricCharge ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -992,7 +992,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1003,7 +1003,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1084,7 +1084,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
index 28f3abc5c7..8c35321a99 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
@@ -772,7 +772,7 @@ public ElectricChargeDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
index 8f7ed50943..179dd289d7 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
@@ -844,7 +844,7 @@ public ElectricConductance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -854,7 +854,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -865,7 +865,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -946,7 +946,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
index a899d5bc61..7fb750033f 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
@@ -873,7 +873,7 @@ public ElectricConductivity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -883,7 +883,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -894,7 +894,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -975,7 +975,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
index e23a297a31..1830466959 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
@@ -957,7 +957,7 @@ public ElectricCurrent ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -967,7 +967,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -978,7 +978,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1059,7 +1059,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
index e0e1a8235a..3cd1eac901 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
@@ -808,7 +808,7 @@ public ElectricCurrentDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -818,7 +818,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -829,7 +829,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -910,7 +910,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
index ac58c9bb05..1c77c14a8d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
@@ -893,7 +893,7 @@ public ElectricCurrentGradient ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -903,7 +903,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -914,7 +914,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -995,7 +995,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
index f3c04af25c..42baa1ec27 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
@@ -772,7 +772,7 @@ public ElectricField ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
index 783bef5135..e34169d2f2 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
@@ -844,7 +844,7 @@ public ElectricInductance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -854,7 +854,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -865,7 +865,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -946,7 +946,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
index 93d6dc9b16..59c099ef1c 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
@@ -896,7 +896,7 @@ public ElectricPotential ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -906,7 +906,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -917,7 +917,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -998,7 +998,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
index 9f40fd9a73..29ba9f0147 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
@@ -841,7 +841,7 @@ public ElectricPotentialAc ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -851,7 +851,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -862,7 +862,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -943,7 +943,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
index 03d57e82e5..dcb3c6f2e5 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
@@ -1111,7 +1111,7 @@ public ElectricPotentialChangeRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1121,7 +1121,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1132,7 +1132,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1213,7 +1213,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
index f9c25564cc..ffa247b93b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
@@ -841,7 +841,7 @@ public ElectricPotentialDc ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -851,7 +851,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -862,7 +862,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -943,7 +943,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
index 6b54872236..6d275de185 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
@@ -893,7 +893,7 @@ public ElectricResistance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -903,7 +903,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -914,7 +914,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -995,7 +995,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
index 2f41aa7c42..a6b88503ab 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
@@ -1017,7 +1017,7 @@ public ElectricResistivity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1027,7 +1027,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1038,7 +1038,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1119,7 +1119,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
index 18dcd2106f..6b46fee8a7 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
@@ -808,7 +808,7 @@ public ElectricSurfaceChargeDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -818,7 +818,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -829,7 +829,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -910,7 +910,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs
index 89dcce8f0f..d7daf39f9e 100644
--- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs
@@ -1557,7 +1557,7 @@ public Energy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1567,7 +1567,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1578,7 +1578,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1659,7 +1659,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs
index 76dade2432..08e609e323 100644
--- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs
@@ -983,7 +983,7 @@ public EnergyDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -993,7 +993,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1004,7 +1004,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1085,7 +1085,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
index 2b7f232c7a..c9a57e8034 100644
--- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
@@ -907,7 +907,7 @@ public Entropy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -917,7 +917,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -928,7 +928,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1009,7 +1009,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs
index c32b8ff4f4..2dbbb1e25d 100644
--- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs
@@ -1114,7 +1114,7 @@ public Force ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1124,7 +1124,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1135,7 +1135,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1216,7 +1216,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
index b1637c21ac..34eaeba4b5 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
@@ -1037,7 +1037,7 @@ public ForceChangeRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1047,7 +1047,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1058,7 +1058,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1139,7 +1139,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
index b0fd94bd83..d368fbf8db 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
@@ -1507,7 +1507,7 @@ public ForcePerLength ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1517,7 +1517,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1528,7 +1528,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1609,7 +1609,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
index 282a7a0668..6336491b61 100644
--- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
@@ -1001,7 +1001,7 @@ public Frequency ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1011,7 +1011,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1022,7 +1022,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1103,7 +1103,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
index d83fe4a78e..1a326597bf 100644
--- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
@@ -826,7 +826,7 @@ public FuelEfficiency ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -836,7 +836,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -847,7 +847,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -928,7 +928,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
index f35c0c965c..a6faa4af3b 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
@@ -1091,7 +1091,7 @@ public HeatFlux ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1101,7 +1101,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1112,7 +1112,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1193,7 +1193,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
index 0ec4e0c3b5..7d5b0bd858 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
@@ -841,7 +841,7 @@ public HeatTransferCoefficient ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -851,7 +851,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -862,7 +862,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -943,7 +943,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
index b47f47b6c6..4316c922a2 100644
--- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
@@ -826,7 +826,7 @@ public Illuminance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -836,7 +836,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -847,7 +847,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -928,7 +928,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs
index 5ec8db71b6..e94c048b56 100644
--- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs
@@ -985,7 +985,7 @@ public Impulse ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -995,7 +995,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1006,7 +1006,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1087,7 +1087,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs
index 879d4e6a74..492b0e39c8 100644
--- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs
@@ -1219,7 +1219,7 @@ public Information ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1229,7 +1229,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1240,7 +1240,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1321,7 +1321,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
index 253ff5619a..7285ab4c28 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
@@ -1003,7 +1003,7 @@ public Irradiance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1013,7 +1013,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1024,7 +1024,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1105,7 +1105,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
index ba5b7c0b17..fb8abce4de 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
@@ -916,7 +916,7 @@ public Irradiation ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -926,7 +926,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -937,7 +937,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1018,7 +1018,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs
index 4bd703c49b..75d0909e5d 100644
--- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs
@@ -965,7 +965,7 @@ public Jerk ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -975,7 +975,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -986,7 +986,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1067,7 +1067,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
index 2b4cbe6551..b965db6b1e 100644
--- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
@@ -953,7 +953,7 @@ public KinematicViscosity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -963,7 +963,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -974,7 +974,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1055,7 +1055,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs b/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs
index 9653d8a1b3..a57a30622e 100644
--- a/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs
@@ -808,7 +808,7 @@ public LeakRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -818,7 +818,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -829,7 +829,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -910,7 +910,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs
index 92a7b33b85..5d13325e42 100644
--- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs
@@ -1649,7 +1649,7 @@ public Length ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1659,7 +1659,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1670,7 +1670,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1751,7 +1751,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs
index c941fab9e1..21c2b9117f 100644
--- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs
@@ -795,7 +795,7 @@ public Level ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -805,7 +805,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -816,7 +816,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -897,7 +897,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
index c9bfd1c990..110663bf32 100644
--- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
@@ -1108,7 +1108,7 @@ public LinearDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1118,7 +1118,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1129,7 +1129,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1210,7 +1210,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs
index 0cca0c71f2..7c76f670b7 100644
--- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs
@@ -1204,7 +1204,7 @@ public LinearPowerDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1214,7 +1214,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1225,7 +1225,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1306,7 +1306,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs
index e935b9e828..aa0648164e 100644
--- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs
@@ -950,7 +950,7 @@ public Luminance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -960,7 +960,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -971,7 +971,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1052,7 +1052,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
index 3095404246..cc006ffae7 100644
--- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
@@ -1006,7 +1006,7 @@ public Luminosity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1016,7 +1016,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1027,7 +1027,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1108,7 +1108,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
index 36e81a2468..fbee22f23e 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
@@ -772,7 +772,7 @@ public LuminousFlux ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
index cb9f5e208a..d570e70435 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
@@ -795,7 +795,7 @@ public LuminousIntensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -805,7 +805,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -816,7 +816,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -897,7 +897,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
index e42f4c3691..2f5671ab2b 100644
--- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
@@ -862,7 +862,7 @@ public MagneticField ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -872,7 +872,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -883,7 +883,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -964,7 +964,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
index 03151d63c6..997efb1953 100644
--- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
@@ -772,7 +772,7 @@ public MagneticFlux ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
index 47986906e4..274f116f41 100644
--- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
@@ -772,7 +772,7 @@ public Magnetization ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs
index 288b3e3de1..2ab58cdc87 100644
--- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs
@@ -1358,7 +1358,7 @@ public Mass ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1368,7 +1368,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1379,7 +1379,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1460,7 +1460,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
index e23bfad2af..b4aa252a9c 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
@@ -1680,7 +1680,7 @@ public MassConcentration ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1690,7 +1690,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1701,7 +1701,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1782,7 +1782,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
index cbbf268007..c589da5421 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
@@ -1424,7 +1424,7 @@ public MassFlow ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1434,7 +1434,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1445,7 +1445,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1526,7 +1526,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
index 3b455c3c08..3d9e5a6324 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
@@ -997,7 +997,7 @@ public MassFlux ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1007,7 +1007,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1018,7 +1018,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1099,7 +1099,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
index ff0c5a1585..a98e8971f7 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
@@ -1202,7 +1202,7 @@ public MassFraction ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1212,7 +1212,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1223,7 +1223,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1304,7 +1304,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
index df5dd24559..a96d1ac25d 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
@@ -1255,7 +1255,7 @@ public MassMomentOfInertia ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1265,7 +1265,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1276,7 +1276,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1357,7 +1357,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Molality.g.cs b/UnitsNet/GeneratedCode/Quantities/Molality.g.cs
index 2c2a254b54..bfef9225d5 100644
--- a/UnitsNet/GeneratedCode/Quantities/Molality.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Molality.g.cs
@@ -808,7 +808,7 @@ public Molality ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -818,7 +818,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -829,7 +829,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -910,7 +910,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
index cdb5b5b437..a65136b21e 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
@@ -805,7 +805,7 @@ public MolarEnergy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -815,7 +815,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -826,7 +826,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -907,7 +907,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
index fd310cf980..e0c5fee4a4 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
@@ -805,7 +805,7 @@ public MolarEntropy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -815,7 +815,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -826,7 +826,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -907,7 +907,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs
index bd8d3d1756..5e681b772d 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs
@@ -950,7 +950,7 @@ public MolarFlow ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -960,7 +960,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -971,7 +971,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1052,7 +1052,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
index 39480af4d4..107abbcb86 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
@@ -1015,7 +1015,7 @@ public MolarMass ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1025,7 +1025,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1036,7 +1036,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1117,7 +1117,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
index 1e86d4efa7..a85e673180 100644
--- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
@@ -996,7 +996,7 @@ public Molarity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1006,7 +1006,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1017,7 +1017,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1098,7 +1098,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
index 15dbf46364..e33b9e6a7d 100644
--- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
@@ -772,7 +772,7 @@ public Permeability ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
index 0b1b21bbc6..908d6af00e 100644
--- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
@@ -772,7 +772,7 @@ public Permittivity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs
index b89b51198c..9f7e3bfaea 100644
--- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs
@@ -844,7 +844,7 @@ public PorousMediumPermeability ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -854,7 +854,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -865,7 +865,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -946,7 +946,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs
index 1c8c7e8071..7d10301d0f 100644
--- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs
@@ -1344,7 +1344,7 @@ public Power ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1354,7 +1354,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1365,7 +1365,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1446,7 +1446,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
index 20837b30dc..2cfba8bb22 100644
--- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
@@ -1543,7 +1543,7 @@ public PowerDensity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1553,7 +1553,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1564,7 +1564,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1645,7 +1645,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
index e44cb398a2..7b2313d563 100644
--- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
@@ -795,7 +795,7 @@ public PowerRatio ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -805,7 +805,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -816,7 +816,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -897,7 +897,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
index f53b915c5b..3ac216e3c2 100644
--- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
@@ -1712,7 +1712,7 @@ public Pressure ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1722,7 +1722,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1733,7 +1733,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1814,7 +1814,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
index 1dbc71023e..d8fef264e1 100644
--- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
@@ -1091,7 +1091,7 @@ public PressureChangeRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1101,7 +1101,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1112,7 +1112,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1193,7 +1193,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs b/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs
index beb7add6f5..225ca0b76c 100644
--- a/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs
@@ -859,7 +859,7 @@ public RadiationEquivalentDose ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -869,7 +869,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -880,7 +880,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -961,7 +961,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RadiationExposure.g.cs b/UnitsNet/GeneratedCode/Quantities/RadiationExposure.g.cs
index e72776f24a..3c1cf93c9b 100644
--- a/UnitsNet/GeneratedCode/Quantities/RadiationExposure.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RadiationExposure.g.cs
@@ -895,7 +895,7 @@ public RadiationExposure ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -905,7 +905,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -916,7 +916,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -997,7 +997,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Radioactivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Radioactivity.g.cs
index fc19475ae3..f6268c115b 100644
--- a/UnitsNet/GeneratedCode/Quantities/Radioactivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Radioactivity.g.cs
@@ -1273,7 +1273,7 @@ public Radioactivity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1283,7 +1283,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1294,7 +1294,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1375,7 +1375,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
index 2f7c2a7343..dad3083376 100644
--- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
@@ -882,7 +882,7 @@ public Ratio ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -892,7 +892,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -903,7 +903,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -984,7 +984,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
index 3d139a0633..a6ed3c587c 100644
--- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
@@ -787,7 +787,7 @@ public RatioChangeRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -797,7 +797,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -808,7 +808,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -889,7 +889,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
index 2a0252b260..3ee6691772 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
@@ -805,7 +805,7 @@ public ReactiveEnergy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -815,7 +815,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -826,7 +826,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -907,7 +907,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
index 0de33497c9..ac466549cf 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
@@ -823,7 +823,7 @@ public ReactivePower ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -833,7 +833,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -844,7 +844,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -925,7 +925,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs
index 0a9572c38a..0f23bd8253 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs
@@ -1003,7 +1003,7 @@ public ReciprocalArea ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1013,7 +1013,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1024,7 +1024,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1105,7 +1105,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs
index 8351d68764..7bbaa9a5f7 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs
@@ -999,7 +999,7 @@ public ReciprocalLength ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1009,7 +1009,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1020,7 +1020,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1101,7 +1101,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs
index 6d6a98c363..89f9aa675e 100644
--- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs
@@ -769,7 +769,7 @@ public RelativeHumidity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -779,7 +779,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -790,7 +790,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -871,7 +871,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs
index e4cc7ed914..72c2a3fe0c 100644
--- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs
@@ -823,7 +823,7 @@ public RotationalAcceleration ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -833,7 +833,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -844,7 +844,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -925,7 +925,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs
index dd97f0ccd7..f30da6ee18 100644
--- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs
@@ -1008,7 +1008,7 @@ public RotationalSpeed ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1018,7 +1018,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1029,7 +1029,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1110,7 +1110,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs
index 4915fbf4cc..5534aade15 100644
--- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs
@@ -1375,7 +1375,7 @@ public RotationalStiffness ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1385,7 +1385,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1396,7 +1396,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1477,7 +1477,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
index e951bca9ea..1d248c8539 100644
--- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
@@ -857,7 +857,7 @@ public RotationalStiffnessPerLength ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -867,7 +867,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -878,7 +878,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -959,7 +959,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs
index 22785e2963..f8997d41f7 100644
--- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs
@@ -769,7 +769,7 @@ public Scalar ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -779,7 +779,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -790,7 +790,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -871,7 +871,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs
index 74290bb538..1b2f26dc7b 100644
--- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs
@@ -772,7 +772,7 @@ public SolidAngle ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs
index 1bd8365095..ba34d39be8 100644
--- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs
@@ -1351,7 +1351,7 @@ public SpecificEnergy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1361,7 +1361,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1372,7 +1372,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1453,7 +1453,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs
index 9dc99129a4..46e3834282 100644
--- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs
@@ -936,7 +936,7 @@ public SpecificEntropy ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -946,7 +946,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -957,7 +957,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1038,7 +1038,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs
index 3f27decb33..a9deb63ca4 100644
--- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs
@@ -826,7 +826,7 @@ public SpecificFuelConsumption ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -836,7 +836,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -847,7 +847,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -928,7 +928,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs
index 80a75168c8..9c8b2e6dd0 100644
--- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs
@@ -834,7 +834,7 @@ public SpecificVolume ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -844,7 +844,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -855,7 +855,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -936,7 +936,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs
index 78436a81f3..34f4ce8753 100644
--- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs
@@ -1097,7 +1097,7 @@ public SpecificWeight ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1107,7 +1107,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1118,7 +1118,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1199,7 +1199,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs
index 9e7b90a798..672b28641d 100644
--- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs
@@ -1410,7 +1410,7 @@ public Speed ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1420,7 +1420,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1431,7 +1431,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1512,7 +1512,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs
index 67e25c664b..1a0f0b897a 100644
--- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs
@@ -913,7 +913,7 @@ public StandardVolumeFlow ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -923,7 +923,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -934,7 +934,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1015,7 +1015,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs
index e1820f8a49..0b43001855 100644
--- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs
@@ -882,7 +882,7 @@ public Temperature ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -892,7 +892,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -903,7 +903,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -984,7 +984,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
index 252ff11991..ec9cf4ae34 100644
--- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
@@ -947,7 +947,7 @@ public TemperatureChangeRate ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -957,7 +957,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -968,7 +968,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1049,7 +1049,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs
index ffb21228ac..189706f7c6 100644
--- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs
@@ -977,7 +977,7 @@ public TemperatureDelta ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -987,7 +987,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -998,7 +998,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1079,7 +1079,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs
index 51e230eb12..f831793d16 100644
--- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs
@@ -839,7 +839,7 @@ public TemperatureGradient ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -849,7 +849,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -860,7 +860,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -941,7 +941,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs
index 76102b4c4e..903656783d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs
@@ -790,7 +790,7 @@ public ThermalConductivity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -800,7 +800,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -811,7 +811,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -892,7 +892,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs
index d53ba65f0a..0503bb0d9f 100644
--- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs
@@ -859,7 +859,7 @@ public ThermalResistance ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -869,7 +869,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -880,7 +880,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -961,7 +961,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs
index b08a461fb0..0f8d83f707 100644
--- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs
@@ -1259,7 +1259,7 @@ public Torque ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1269,7 +1269,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1280,7 +1280,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1361,7 +1361,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs
index 0372ec2f7b..63818dea2b 100644
--- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs
@@ -1129,7 +1129,7 @@ public TorquePerLength ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1139,7 +1139,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1150,7 +1150,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1231,7 +1231,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs
index 501da17a9c..f42703efe4 100644
--- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs
@@ -772,7 +772,7 @@ public Turbidity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -782,7 +782,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -793,7 +793,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -874,7 +874,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs
index 460f121918..98df3d65b5 100644
--- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs
@@ -769,7 +769,7 @@ public VitaminA ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -779,7 +779,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -790,7 +790,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -871,7 +871,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs
index b154b2744a..d55c2af718 100644
--- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs
@@ -1823,7 +1823,7 @@ public Volume ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1833,7 +1833,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1844,7 +1844,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1925,7 +1925,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs
index a80cffd728..63905c6680 100644
--- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs
@@ -1137,7 +1137,7 @@ public VolumeConcentration ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -1147,7 +1147,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -1158,7 +1158,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1239,7 +1239,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs
index 044bbc233c..8372dd4c20 100644
--- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs
@@ -2145,7 +2145,7 @@ public VolumeFlow ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -2155,7 +2155,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -2166,7 +2166,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -2247,7 +2247,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs
index ded61f87c5..a4451e01a2 100644
--- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs
@@ -787,7 +787,7 @@ public VolumeFlowPerArea ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -797,7 +797,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -808,7 +808,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -889,7 +889,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs
index 75585b6268..784b832426 100644
--- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs
@@ -913,7 +913,7 @@ public VolumePerLength ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -923,7 +923,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -934,7 +934,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1015,7 +1015,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs
index 188d876f40..1faefe105b 100644
--- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs
@@ -916,7 +916,7 @@ public VolumetricHeatCapacity ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -926,7 +926,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -937,7 +937,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -1018,7 +1018,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs
index 116d1e1e94..e89c929aaa 100644
--- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs
@@ -859,7 +859,7 @@ public WarpingMomentOfInertia ToUnit(UnitSystem unitSystem)
/// String representation.
public override string ToString()
{
- return ToString("g");
+ return ToString(null, null);
}
///
@@ -869,7 +869,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
///
@@ -880,7 +880,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}
///
@@ -961,7 +961,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{
- return ToString("g", provider);
+ return ToString(null, provider);
}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs
index fcbca7350d..ad9b3e647e 100644
--- a/UnitsNet/QuantityFormatter.cs
+++ b/UnitsNet/QuantityFormatter.cs
@@ -3,186 +3,222 @@
using System;
using System.Globalization;
-using System.Linq;
-using UnitsNet.Units;
-namespace UnitsNet
+namespace UnitsNet;
+
+///
+/// The QuantityFormatter class is responsible for formatting a quantity using the given format string.
+///
+public class QuantityFormatter
{
///
- /// The QuantityFormatter class is responsible for formatting a quantity using the given format string.
+ /// Formats a quantity using the given format string and format provider.
///
- public class QuantityFormatter
+ /// The quantity to format.
+ /// The format string.
+ ///
+ /// The valid format strings are as follows:
+ ///
+ /// -
+ /// A standard numeric format string.
+ ///
+ /// Any of the
+ ///
+ /// Standard format specifiers
+ /// .
+ ///
+ ///
+ /// -
+ /// "A" or "a".
+ /// The default unit abbreviation for , such as "m".
+ ///
+ /// -
+ /// "A0", "A1", ..., "An" or "a0", "a1", ..., "an".
+ ///
+ /// The n-th unit abbreviation for the . "a0" is the same as "a".
+ /// A will be thrown if the requested abbreviation index does not exist.
+ ///
+ ///
+ /// -
+ /// "S" or "s".
+ ///
+ /// The value with 2 significant digits after the radix followed by the unit abbreviation, such as
+ /// "1.23 m".
+ ///
+ ///
+ /// -
+ /// "S0", "S1", ..., "Sn" or "s0", "s1", ..., "sn".
+ ///
+ /// The value with n significant digits after the radix followed by the unit abbreviation. "S2"
+ /// and "s2" is the same as "s".
+ ///
+ ///
+ ///
+ /// For more information about the formatter, see the
+ ///
+ /// QuantityFormatter
+ /// section
+ /// .
+ ///
+ /// The string representation.
+ /// Thrown when the format specifier is invalid.
+ public static string Format(IQuantity quantity, string format)
+ where TUnitType : Enum
{
- ///
- /// The available UnitsNet custom format specifiers.
- ///
- private static readonly char[] UnitsNetFormatSpecifiers = { 'A', 'a', 'G', 'g', 'Q', 'q', 'S', 's', 'U', 'u', 'V', 'v' };
+ return Format(quantity, format, CultureInfo.CurrentCulture);
+ }
+
+ ///
+ /// Formats a quantity using the given format string and format provider.
+ ///
+ /// The quantity to format.
+ /// The format string.
+ ///
+ /// The format provider to use for localization and number formatting. Defaults to
+ /// if null.
+ ///
+ ///
+ /// The valid format strings are as follows:
+ ///
+ /// -
+ /// A standard numeric format string.
+ ///
+ /// Any of the
+ ///
+ /// Standard format specifiers
+ /// .
+ ///
+ ///
+ /// -
+ /// "A" or "a".
+ /// The default unit abbreviation for , such as "m".
+ ///
+ /// -
+ /// "A0", "A1", ..., "An" or "a0", "a1", ..., "an".
+ ///
+ /// The n-th unit abbreviation for the . "a0" is the same as "a".
+ /// A will be thrown if the requested abbreviation index does not exist.
+ ///
+ ///
+ /// -
+ /// "S" or "s".
+ ///
+ /// The value with 2 significant digits after the radix followed by the unit abbreviation, such as
+ /// "1.23 m".
+ ///
+ ///
+ /// -
+ /// "S0", "S1", ..., "Sn" or "s0", "s1", ..., "sn".
+ ///
+ /// The value with n significant digits after the radix followed by the unit abbreviation. "S2"
+ /// and "s2" is the same as "s".
+ ///
+ ///
+ ///
+ /// For more information about the formatter, see the
+ ///
+ /// QuantityFormatter
+ /// section
+ /// .
+ ///
+ /// The string representation.
+ /// Thrown when the format specifier is invalid.
+ public static string Format(IQuantity quantity, string? format, IFormatProvider? formatProvider)
+ where TUnitType : Enum
+ {
+ return FormatUntrimmed(quantity, format, formatProvider).TrimEnd();
+ }
- ///
- /// Formats a quantity using the given format string and format provider.
- ///
- /// The quantity's unit type, for example .
- /// The quantity to format.
- /// The format string.
- ///
- /// The valid format strings are as follows:
- ///
- /// -
- /// A standard numeric format string.
- /// Any of the standard numeric format for , except for "G" or "g", which have a special implementation.
- /// "C" or "c", "E" or "e", "F" or "f", "N" or "n", "P" or "p", "R" or "r" are all accepted.
- /// See https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#standard-format-specifiers.
- ///
- ///
- /// -
- /// "G" or "g".
- /// The value with 2 significant digits after the radix followed by the unit abbreviation, such as "1.23 m".
- ///
- /// -
- /// "A" or "a".
- /// The default unit abbreviation for , such as "m".
- ///
- /// -
- /// "A0", "A1", ..., "An" or "a0", "a1", ..., "an".
- /// The n-th unit abbreviation for . "a0" is the same as "a".
- /// A will be thrown if the requested abbreviation index does not exist.
- ///
- /// -
- /// "U" or "u".
- /// The enum name of , such as "Meter".
- ///
- /// -
- /// "Q" or "q".
- /// The quantity name, such as "Length".
- ///
- ///
- ///
- /// The string representation.
- public static string Format(IQuantity quantity, string format)
- where TUnitType : Enum
+ private static string FormatUntrimmed(IQuantity quantity, string? format, IFormatProvider? formatProvider)
+ where TUnitType : Enum
+ {
+ formatProvider ??= CultureInfo.CurrentCulture;
+ if (format is null)
{
- return Format(quantity, format, CultureInfo.CurrentCulture);
+ format = "G";
}
-
- ///
- /// Formats a quantity using the given format string and format provider.
- ///
- /// The quantity's unit type, for example .
- /// The quantity to format.
- /// The format string.
- /// The format provider to use for localization and number formatting. Defaults to
- /// if null.
- ///
- /// The valid format strings are as follows:
- ///
- /// -
- /// A standard numeric format string.
- /// Any of the standard numeric format for , except for "G" or "g", which have a special implementation.
- /// "C" or "c", "E" or "e", "F" or "f", "N" or "n", "P" or "p", "R" or "r" are all accepted.
- /// See https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#standard-format-specifiers.
- ///
- ///
- /// -
- /// "G" or "g".
- /// The value with 2 significant digits after the radix followed by the unit abbreviation, such as "1.23 m".
- ///
- /// -
- /// "A" or "a".
- /// The default unit abbreviation for , such as "m".
- ///
- /// -
- /// "A0", "A1", ..., "An" or "a0", "a1", ..., "an".
- /// The n-th unit abbreviation for . "a0" is the same as "a".
- /// A will be thrown if the requested abbreviation index does not exist.
- ///
- /// -
- /// "U" or "u".
- /// The enum name of , such as "Meter".
- ///
- /// -
- /// "Q" or "q".
- /// The quantity name, such as "Length".
- ///
- ///
- ///
- /// The string representation.
- public static string Format(IQuantity quantity, string? format, IFormatProvider? formatProvider)
- where TUnitType : Enum
+ else if (format.Length == 1)
{
- formatProvider ??= CultureInfo.CurrentCulture;
- return FormatUntrimmed(quantity, format, formatProvider).TrimEnd();
+ switch (format[0])
+ {
+ case 'G' or 'g':
+ return FormatWithValueAndAbbreviation(quantity, format, formatProvider);
+ case 'S' or 's':
+ return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 0);
+ case 'A' or 'a':
+ return UnitsNetSetup.Default.UnitAbbreviations.GetDefaultAbbreviation(quantity.Unit, formatProvider);
+ case 'U' or 'u':
+ throw new FormatException($"The \"{format}\" format is no longer supported: consider using the Unit property.");
+ case 'V' or 'v':
+ throw new FormatException($"The \"{format}\" format is no longer supported: consider using the Value property.");
+ case 'Q' or 'q':
+ throw new FormatException($"The \"{format}\" format is no longer supported: consider using the QuantityInfo property.");
+ case 'C' or 'c':
+ throw new FormatException($"The \"{format}\" (currency) format is not supported.");
+ case 'P' or 'p':
+ throw new FormatException($"The \"{format}\" (percent) format is not supported.");
+ }
}
-
- private static string FormatUntrimmed(IQuantity quantity, string? format, IFormatProvider? formatProvider)
- where TUnitType : Enum
+ else if(format.Length > 1)
{
- formatProvider ??= CultureInfo.CurrentCulture;
-
- if (string.IsNullOrWhiteSpace(format))
- format = "g";
-
- char formatSpecifier = format![0]; // netstandard2.0 nullable quirk
-
- if (UnitsNetFormatSpecifiers.Any(unitsNetFormatSpecifier => unitsNetFormatSpecifier == formatSpecifier))
+ switch (format[0])
{
- // UnitsNet custom format string
+#if NET
+ case 'S' or 's' when int.TryParse(format.AsSpan(1), out var precisionSpecifier):
+ return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, precisionSpecifier);
+ case 'A' or 'a' when int.TryParse(format.AsSpan(1), out var abbreviationIndex):
+ {
+ var abbreviations = UnitsNetSetup.Default.UnitAbbreviations.GetUnitAbbreviations(quantity.Unit, formatProvider);
- int precisionSpecifier = 0;
+ if (abbreviationIndex >= abbreviations.Length)
+ {
+ throw new FormatException($"The \"{format}\" format string is invalid because the index is out of range.");
+ }
- switch(formatSpecifier)
- {
- case 'A':
- case 'a':
- case 'S':
- case 's':
- if (format.Length > 1 && !int.TryParse(format.Substring(1), out precisionSpecifier))
- throw new FormatException($"The {format} format string is not supported.");
- break;
+ return abbreviations[abbreviationIndex];
}
-
- switch(formatSpecifier)
+ case 'C' or 'c' when int.TryParse(format.AsSpan(1), out _):
+ throw new FormatException($"The \"{format}\" (currency) format is not supported.");
+ case 'P' or 'p' when int.TryParse(format.AsSpan(1), out _):
+ throw new FormatException($"The \"{format}\" (percent) format is not supported.");
+#else
+ case 'S' or 's' when int.TryParse(format.Substring(1), out var precisionSpecifier):
+ return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, precisionSpecifier);
+ case 'A' or 'a' when int.TryParse(format.Substring(1), out var abbreviationIndex):
{
- case 'G':
- case 'g':
- return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2);
- case 'A':
- case 'a':
- var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider);
+ var abbreviations = UnitsNetSetup.Default.UnitAbbreviations.GetUnitAbbreviations(quantity.Unit, formatProvider);
- if (precisionSpecifier >= abbreviations.Length)
- throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist.");
+ if (abbreviationIndex >= abbreviations.Length)
+ {
+ throw new FormatException($"The \"{format}\" format string is invalid because the index is out of range.");
+ }
- return abbreviations[precisionSpecifier];
- case 'V':
- case 'v':
- return quantity.Value.ToString(formatProvider);
- case 'U':
- case 'u':
- return quantity.Unit.ToString();
- case 'Q':
- case 'q':
- return quantity.QuantityInfo.Name;
- case 'S':
- case 's':
- return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, precisionSpecifier);
- default:
- throw new FormatException($"The {format} format string is not supported.");
+ return abbreviations[abbreviationIndex];
}
- }
- else
- {
- // Anything else is a standard numeric format string with default unit abbreviation postfix.
-
- var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider);
- return string.Format(formatProvider, $"{{0:{format}}} {{1}}", quantity.Value, abbreviations.First());
+ case 'C' or 'c' when int.TryParse(format.Substring(1), out _):
+ throw new FormatException($"The \"{format}\" (currency) format is not supported.");
+ case 'P' or 'p' when int.TryParse(format.Substring(1), out _):
+ throw new FormatException($"The \"{format}\" (percent) format is not supported.");
+#endif
}
}
+
+ // Anything else is a standard numeric format string with default unit abbreviation postfix.
+ return FormatWithValueAndAbbreviation(quantity, format, formatProvider);
+ }
- private static string ToStringWithSignificantDigitsAfterRadix(IQuantity quantity, IFormatProvider formatProvider, int number) where TUnitType : Enum
- {
- string formatForSignificantDigits = UnitFormatter.GetFormat(quantity.Value, number);
- object[] formatArgs = UnitFormatter.GetFormatArgs(quantity.Unit, quantity.Value, formatProvider, Enumerable.Empty
/// The unit the quantity should be displayed in
/// Formatting string
- public DisplayAsUnitAttribute(object? unitType, string format = "") : base(unitType)
+ public DisplayAsUnitAttribute(object? unitType, string format = "G") : base(unitType)
{
Format = format;
}