System.Convert.Convert.ToInt64 C# (CSharp) Method

ToInt64() public static method

public static ToInt64 ( float value ) : long
value float
return long
		public static long ToInt64 (float value) 
		{ 
			if (value > Int64.MaxValue || value < Int64.MinValue) 
				throw new OverflowException (Locale.GetText (
					"Value is greater than Int64.MaxValue or less than Int64.MinValue"));
	  
			// Returned Even-Rounded, pass to Math as a double, could
			// just call Convert.ToInt64 ( (double)value);
			return (long)(Math.Round ( (double)value));
		}

Same methods

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