public void Insert(int index, XBase value) { if (value == null || value.GetType() != _ChildItemType) { throw new Exception("类型不正确。请输入类型为" + _ChildItemType.ToString() + "的变量。"); } // Use base class to process actual collection operation _List.Insert(index, value); }
public virtual XBase Add(XBase value) { //if( value == null || TypeHelper.IsXMLObjectType( value.GetType() ) == false ) if (value == null) { throw new ArgumentNullException(); } if (value.GetType() != _ChildItemType) { throw new Exception("类型不正确。请输入类型为" + XObjectHelper.XBaseType.ToString() + "的变量。_ChildItemType=" + _ChildItemType.ToString() + " valueType" + value.GetType().ToString()); } // Use base class to process actual collection operation return(_List.Add(value)); }
public int IndexOf(XBase value) { // Find the 0 based index of the requested entry return(_List.IndexOf(value)); }
public bool Contains(XBase value) { // Use base class to process actual collection operation return(_List.Contains(value)); }
public void Remove(XBase value) { // Use base class to process actual collection operation _List.Remove(value); }
public int IndexOf(XBase value) { return(List.IndexOf(value)); }
public bool Contains(XBase value) { return(List.Contains(value as object)); }
public void Insert(int index, XBase value) { List.Insert(index, value as object); }
public void Remove(XBase value) { List.Remove(value as object); }
public XBase Add(XBase value) { List.Add(value as object); return(value); }