System.Windows.Forms.NumericUpDown.UpdateEditText C# (CSharp) Method

UpdateEditText() protected method

protected UpdateEditText ( ) : void
return void
		protected override void UpdateEditText () {
			if (suppress_validation)
				return;

			if (UserEdit)
				ParseEditText ();

			ChangingText = true;
			if (!hexadecimal) {
				// "N" and "F" differ only in that "N" includes commas
				// every 3 digits to the left of the decimal and "F"
				// does not.

				string format_string;

				if (thousands_separator) {
					format_string = "N";
				} else {
					format_string = "F";
				}

				format_string += decimal_places;

				Text = dvalue.ToString (format_string, CultureInfo.CurrentCulture);

			} else {
				// Cast to Int64 to be able to use the "X" formatter.
				// If the value is below Int64.MinValue or above Int64.MaxValue,
				// then an OverflowException will be thrown, as with .NET.
				Text = ((Int64)dvalue).ToString("X", CultureInfo.CurrentCulture);
			}
		}