CustomXmlPartCollection Class
Represents a collection of CustomXmlParts.
public class CustomXmlPartCollection : Collection<CustomXmlPart>, IList, ICollection, IList<CustomXmlPart>, ICollection<CustomXmlPart>, IEnumerable<CustomXmlPart>, IEnumerable
Public Class CustomXmlPartCollection
Inherits Collection(Of CustomXmlPart)
Implements IList, ICollection, IList(Of CustomXmlPart), ICollection(Of CustomXmlPart), IEnumerable(Of CustomXmlPart), IEnumerable
- Inheritance:
- System.ObjectCustomXmlPartCollection
Implements
Properties
Count
Gets the number of CustomXmlParts contained in the collection.
Property Value
- System.Int32
The number of CustomXmlParts contained in the collection.
Item[Int32]
Gets or sets the CustomXmlPart at the specified index.
public CustomXmlPart this[int index] { get; set; }
Public Property Item(index As Integer) As CustomXmlPart
Parameters
index
- System.Int32
The zero-based index of the CustomXmlPart to get or set.
Property Value
The CustomXmlPart at the specified index.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than zero or index
is equal to or greater than Count.
- System.ArgumentNullException
value
is null.
Methods
Add(CustomXmlPart)
Adds a CustomXmlPart to the end of the collection.
Parameters
item
- CustomXmlPart
The CustomXmlPart to be added to the end of the collection.
Exceptions
- System.ArgumentNullException
item
is null.
- System.ArgumentException
item
is already contained in another CustomXmlPartCollection or it belongs to another SlideObject.
AddNew()
Adds a new empty CustomXmlPart to the end of the collection.
Returns
A new empty CustomXmlPart added to the collection.
AddNew(Byte[])
Adds a new CustomXmlPart with given data to the end of the collection.
public CustomXmlPart AddNew(byte[] data)
Public Function AddNew(data As Byte()) As CustomXmlPart
Parameters
data
- System.Byte[]
The data of the new CustomXmlPart.
Returns
A newCustomXmlPart added to the collection.
Clear()
Removes all CustomXmlParts from the collection.
Contains(CustomXmlPart)
Determines whether a CustomXmlPart is in the collection.
public bool Contains(CustomXmlPart item)
Public Function Contains(item As CustomXmlPart) As Boolean
Parameters
item
- CustomXmlPart
The CustomXmlPart to locate in the collection.
Returns
- System.Boolean
true if item
is found in the collection; otherwise, false.
Exceptions
- System.ArgumentNullException
item
is null.
GetEnumerator()
Returns an enumerator that iterates through the CustomXmlPartCollection.
public IEnumerator<CustomXmlPart> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of CustomXmlPart)
Returns
- System.Collections.Generic.IEnumerator<CustomXmlPart>
An System.Collections.Generic.IEnumerator<T> for the collection.
IndexOf(CustomXmlPart)
Searches for the specified CustomXmlPart and returns the zero-based index of the first occurrence within the entire collection.
public int IndexOf(CustomXmlPart item)
Public Function IndexOf(item As CustomXmlPart) As Integer
Parameters
item
- CustomXmlPart
The CustomXmlPart to locate in the collection.
Returns
- System.Int32
The zero-based index of the first occurrence of item
within the entire collection, if found; otherwise, -1.
Insert(Int32, CustomXmlPart)
Inserts a CustomXmlPart to the collection at the specified index.
public void Insert(int index, CustomXmlPart item)
Public Sub Insert(index As Integer, item As CustomXmlPart)
Parameters
index
- System.Int32
The zero-based index at which CustomXmlPart should be inserted.
item
- CustomXmlPart
The CustomXmlPart to insert into the collection.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than zero or index
is equal to or greater than Count.
- System.ArgumentNullException
item
is null.
Remove(CustomXmlPart)
Removes the first occurrence of a specific CustomXmlPart from the collection.
public bool Remove(CustomXmlPart item)
Public Function Remove(item As CustomXmlPart) As Boolean
Parameters
item
- CustomXmlPart
The CustomXmlPart to remove from the collection.
Returns
- System.Boolean
true if item
is successfully removed; otherwise, false. This method also returns false if item
was not found in the original collection.
RemoveAt(Int32)
Removes the CustomXmlPart at the specified index of the collection.
Parameters
index
- System.Int32
The zero-based index of the CustomXmlPart to remove.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than zero or index
is equal to or greater than Count.