System.Convert.Convert.ToInt32 C# (CSharp) Метод

ToInt32() публичный статический Метод

public static ToInt32 ( float value ) : int
value float
Результат int
		public static int ToInt32 (float value) 
		{ 
			if (value > Int32.MaxValue || value < Int32.MinValue) 
				throw new OverflowException (Locale.GetText (
					"Value is greater than Int32.MaxValue or less than Int32.MinValue"));
	  
			// Returned Even-Rounded, pass as a double, could just call
			// Convert.ToInt32 ( (double)value);
			checked {
				return (int)(Math.Round ( (double)value));
			}
		}

Same methods

Convert.Convert::ToInt32 ( System.DateTime value ) : int
Convert.Convert::ToInt32 ( bool value ) : int
Convert.Convert::ToInt32 ( byte value ) : int
Convert.Convert::ToInt32 ( char value ) : int
Convert.Convert::ToInt32 ( decimal value ) : int
Convert.Convert::ToInt32 ( double value ) : int
Convert.Convert::ToInt32 ( int value ) : int
Convert.Convert::ToInt32 ( long value ) : int
Convert.Convert::ToInt32 ( object value ) : int
Convert.Convert::ToInt32 ( object value, IFormatProvider provider ) : int
Convert.Convert::ToInt32 ( sbyte value ) : int
Convert.Convert::ToInt32 ( short value ) : int
Convert.Convert::ToInt32 ( string value ) : int
Convert.Convert::ToInt32 ( string value, IFormatProvider provider ) : int
Convert.Convert::ToInt32 ( string value, int fromBase ) : int
Convert.Convert::ToInt32 ( uint value ) : int
Convert.Convert::ToInt32 ( ulong value ) : int
Convert.Convert::ToInt32 ( ushort value ) : int