Fan.Sys.List.toArray C# (CSharp) Method

toArray() public method

public toArray ( ) : object[]
return object[]
        public object[] toArray()
        {
            if (m_values.Length == m_size) return m_values;
              object[] r = new object[m_size];
              Array.Copy(m_values, 0, r, 0, m_size);
              return r;
        }

Same methods

List::toArray ( object a ) : object[]
List::toArray ( object a, int start, int len ) : object[]

Usage Example

Example #1
0
            public override object callList(List args)
            {
                int argsSize = args == null ? 0 : args.sz();

                bool isStatic = _isStatic();
                int  p        = checkArgs(argsSize, isStatic, false);

                object[] a = new object[p];

                if (isStatic)
                {
                    if (args != null && a.Length > 0)
                    {
                        args.toArray(a, 0, a.Length);
                    }
                    return(m.invoke(null, a));
                }
                else
                {
                    object i = args.get(0);
                    if (a.Length > 0)
                    {
                        args.toArray(a, 1, a.Length);
                    }
                    return(m.invoke(i, a));
                }
            }
All Usage Examples Of Fan.Sys.List::toArray