System.NumberFormatter.FormatRoundtrip C# (CSharp) Метод

FormatRoundtrip() приватный Метод

private FormatRoundtrip ( double origval, NumberFormatInfo nfi ) : string
origval double
nfi System.Globalization.NumberFormatInfo
Результат string
		private string FormatRoundtrip (double origval, NumberFormatInfo nfi)
		{
			NumberFormatter nfc = GetClone ();
			if (origval >= MinRoundtripVal && origval <= MaxRoundtripVal) {
				string shortRep = FormatGeneral (_defPrecision, nfi);
				if (origval == Double.Parse (shortRep, nfi))
					return shortRep;
			}
			return nfc.FormatGeneral (_defPrecision + 2, nfi);
		}

Same methods

NumberFormatter::FormatRoundtrip ( float origval, NumberFormatInfo nfi ) : string