Exemplo n.º 1
0
        public XlFormatCondition Add(XlFormatConditionType type)
        {
            object[] paramArray = new object[1];
            paramArray[0] = type;
            object            returnValue = InstanceType.InvokeMember("Add", BindingFlags.InvokeMethod, null, ComReference, paramArray, XlLateBindingApiSettings.XlThreadCulture);
            XlFormatCondition newClass    = new XlFormatCondition(this, returnValue);

            if (null == returnValue)
            {
                return(null);
            }
            ListChildReferences.Add(newClass);
            return(newClass);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Foreach Enumerator
        /// </summary>
        /// <returns></returns>
        public IEnumerator GetEnumerator()
        {
            int iCount = Count;

            XlFormatCondition[] res_addins = new XlFormatCondition[iCount];

            for (int i = 1; i <= iCount; i++)
            {
                res_addins[i - 1] = this[i];
            }

            for (int i = 0; i < res_addins.Length; i++)
            {
                yield return(res_addins[i]);
            }
        }