We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b9c5b2 commit 4c2e6a0Copy full SHA for 4c2e6a0
UnitsNet/UnitFormatter.cs
@@ -93,7 +93,7 @@ private static bool NearlyEqual(double a, double b)
93
public static object[] GetFormatArgs<TUnit>(TUnit unit, double value, [CanBeNull] CultureInfo culture, IEnumerable<object> args)
94
where TUnit : struct, IComparable, IFormattable
95
{
96
- string abbreviation = UnitSystem.GetCached(culture).GetDefaultAbbreviation(typeof(TUnit), Convert.ToInt32(unit));
+ string abbreviation = UnitSystem.GetCached(culture).GetDefaultAbbreviation(unit);
97
return new object[] { value, abbreviation }.Concat(args).ToArray();
98
}
99
0 commit comments