Erlang.NET.OtpErlangTuple.arity C# (CSharp) Метод

arity() публичный Метод

public arity ( ) : int
Результат int
        public int arity()
        {
            return elems.Length;
        }

Usage Example

Пример #1
0
        /**
         * Determine if two tuples are equal. Tuples are equal if they have the same
         * arity and all of the elements are equal.
         *
         * @param o
         *                the tuple to compare to.
         *
         * @return true if the tuples have the same arity and all the elements are
         *         equal.
         */
        public override bool Equals(Object o)
        {
            if (!(o is OtpErlangTuple))
            {
                return(false);
            }

            OtpErlangTuple t = (OtpErlangTuple)o;
            int            a = arity();

            if (a != t.arity())
            {
                return(false);
            }

            for (int i = 0; i < a; i++)
            {
                if (!elems[i].Equals(t.elems[i]))
                {
                    return(false); // early exit
                }
            }

            return(true);
        }
All Usage Examples Of Erlang.NET.OtpErlangTuple::arity