Skip to content

Commit 2c30890

Browse files
committed
Revert "Expose ToString() overload in WinRT for FeetInches, StonePounds"
This reverts commit e380e46.
1 parent 6616b5b commit 2c30890

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

UnitsNet/CustomCode/UnitClasses/Length.extra.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
using JetBrains.Annotations;
2424
using UnitsNet.Units;
2525

26-
#if WINDOWS_UWP
27-
using Culture=System.String;
28-
#else
29-
using Culture=System.IFormatProvider;
30-
#endif
31-
3226
namespace UnitsNet
3327
{
3428
/// <summary>
@@ -132,7 +126,12 @@ public override string ToString()
132126
return ToString(null);
133127
}
134128

135-
public string ToString([CanBeNull] Culture cultureInfo)
129+
#if WINDOWS_UWP
130+
internal
131+
#else
132+
public
133+
#endif
134+
string ToString([CanBeNull] IFormatProvider cultureInfo)
136135
{
137136
// Note that it isn't customary to use fractions - one wouldn't say "I am 5 feet and 4.5 inches".
138137
// So inches are rounded when converting from base units to feet/inches.

UnitsNet/CustomCode/UnitClasses/Mass.extra.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
using JetBrains.Annotations;
2424
using UnitsNet.Units;
2525

26-
#if WINDOWS_UWP
27-
using Culture = System.String;
28-
#else
29-
using Culture = System.IFormatProvider;
30-
#endif
31-
3226
namespace UnitsNet
3327
{
3428
#if WINDOWS_UWP
@@ -116,7 +110,12 @@ public override string ToString()
116110
return ToString(null);
117111
}
118112

119-
public string ToString([CanBeNull] Culture cultureInfo)
113+
#if WINDOWS_UWP
114+
internal
115+
#else
116+
public
117+
#endif
118+
string ToString([CanBeNull] IFormatProvider cultureInfo)
120119
{
121120
// Note that it isn't customary to use fractions - one wouldn't say "I am 11 stone and 4.5 pounds".
122121
// So pounds are rounded here.

0 commit comments

Comments
 (0)