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

ToShort() public method

Retrieves value converted to short.
public ToShort ( ) : short
return short
        public short ToShort()
        {
            switch (Type.GetTypeCode(m_value.GetType()))
            {
                case TypeCode.UInt16:
                    return (short)((ushort)m_value);

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

            return Convert.ToInt16(m_value);
        }