BitMiracle.LibTiff.Classic.FieldValue.ToUShort C# (CSharp) Method

ToUShort() private method

private ToUShort ( ) : ushort
return ushort
        public ushort ToUShort()
        {
            switch (Type.GetTypeCode(m_value.GetType()))
            {
                case TypeCode.UInt16:
                    return (ushort)m_value;

                case TypeCode.Int16:
                    return (ushort)((short)m_value);
            }

            return Convert.ToUInt16(m_value);
        }