public XlComment AddComment(string text) { object[] paramArray = new object[1]; paramArray[0] = text; object returnValue = InstanceType.InvokeMember("AddComment", BindingFlags.InvokeMethod | BindingFlags.OptionalParamBinding, null, ComReference, paramArray, XlLateBindingApiSettings.XlThreadCulture); XlComment newClass = new XlComment(this, returnValue); ListChildReferences.Add(newClass); return(newClass); }
public XlComment Previous() { object returnValue = InstanceType.InvokeMember("Previous", BindingFlags.InvokeMethod, null, ComReference, null, XlLateBindingApiSettings.XlThreadCulture); XlComment newClass = new XlComment(this, returnValue); if (null == returnValue) { return(null); } ListChildReferences.Add(newClass); return(newClass); }
/// <summary> /// returns a XlComment by Index, not 0 based /// </summary> /// <param name="i"></param> /// <returns></returns> public XlComment this[int index] { get { object[] paramArray = new object[1]; paramArray[0] = index; object returnValue = InstanceType.InvokeMember("Item", BindingFlags.InvokeMethod, null, ComReference, paramArray, XlLateBindingApiSettings.XlThreadCulture); if (null == returnValue) { return(null); } XlComment newClass = new XlComment(this, returnValue); ListChildReferences.Add(newClass); return(newClass); } }
/// <summary> /// Foreach Enumerator /// </summary> /// <returns></returns> public IEnumerator GetEnumerator() { int iCount = Count; XlComment[] res_addins = new XlComment[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]); } }