System.Convert.Convert.ToUInt16 C# (CSharp) Méthode

ToUInt16() private méthode

private ToUInt16 ( decimal value ) : ushort
value decimal
Résultat ushort
		public static ushort ToUInt16 (decimal value) 
		{ 
			if (value > UInt16.MaxValue || value < UInt16.MinValue) 
				throw new OverflowException (Locale.GetText (
					"Value is greater than UInt16.MaxValue or less than UInt16.MinValue"));
	  
			// Returned Even-Rounded
			return (ushort)(Math.Round (value));	  
		}

Same methods

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