NewTOAPIA.Net.Udt.CMsgNo.msgoff C# (CSharp) Method

msgoff() public static method

public static msgoff ( Int32 msgno1, Int32 msgno2 ) : int
msgno1 System.Int32
msgno2 System.Int32
return int
        public static int msgoff(Int32 msgno1, Int32 msgno2)
        {
            if (Math.Abs(msgno1 - msgno2) < m_iMsgNoTH)
                return msgno2 - msgno1;

            if (msgno1 < msgno2)
                return msgno2 - msgno1 - m_iMaxMsgNo - 1;

            return msgno2 - msgno1 + m_iMaxMsgNo + 1;
        }