SvgListBase<T> Class
The list interfaces of SVG (https://svgwg.org/svg2-draft/types.html#ListInterfaces).
public abstract class SvgListBase<T> : IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, IEnumerable where T : notnullProperties
| Name | Description |
|---|---|
| Count | Gets the number of items of the list. |
| Length | Gets the number of items of the list. |
| NumberOfItems | Gets the number of items of the list. |
Count
SvgLists.csLength
SvgLists.csNumberOfItems
SvgLists.csIndexers
| Name | Description |
|---|---|
| this[int] | Gets the item at the given index. |
| this[uint] | Gets or sets the item at the given index; setting an item replaces the existing one. |
Item overloads
this[int]
SvgLists.csthis[uint]
SvgLists.csMethods
| Name | Description |
|---|---|
| AppendItem(T) | Appends the item to the list and returns it. |
| Clear() | Removes all the items of the list. |
| GetEnumerator() | Returns an enumerator that iterates through the collection. |
| GetItem(uint) | Returns the item at the given index, or throws an IndexSizeError when the index is out of range. |
| Initialize(T) | Clears the list, then inserts the given item as its only item and returns it. |
| InsertItemBefore(T, uint) | Inserts the item before the item at the given index (at the end if the index is too large) and returns it. |
| RemoveItem(uint) | Removes the item at the given index from the list and returns it. |
| ReplaceItem(T, uint) | Replaces the item at the given index with the given item and returns the new item. |
| System.Collections.IEnumerable.GetEnumerator() |
AppendItem(T)
SvgLists.csAppends the item to the list and returns it.
public T AppendItem(T newItem)Parameters
newItemT
Returns
T
See also
Clear()
SvgLists.csRemoves all the items of the list.
public void Clear()GetEnumerator()
SvgLists.csReturns an enumerator that iterates through the collection.
public IEnumerator<T> GetEnumerator()Returns
IEnumerator<T> An enumerator that can be used to iterate through the collection.
GetItem(uint)
SvgLists.csInitialize(T)
SvgLists.csClears the list, then inserts the given item as its only item and returns it.
public T Initialize(T newItem)Parameters
newItemT
Returns
T