System.Convert.ToUInt16 C# (CSharp) Method

ToUInt16() private method

private ToUInt16 ( DateTime value ) : ushort
value DateTime
return ushort
        public static ushort ToUInt16(DateTime value)
        {
            return ((IConvertible)value).ToUInt16(null);
        }

Same methods

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

Usage Example

        public ushort ToUInt16(object value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            return(SConvert.ToUInt16(value, CultureInfo.InvariantCulture));
        }
All Usage Examples Of System.Convert::ToUInt16