Class SFArrayList<T>
Extends List with MoveRange, InsertRange and RemoveRange methods. The Item property will grow the array on demand or return NULL if an index is out of range.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class SFArrayList<T> : List<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, ICloneable where T : class
Type Parameters
Name | Description |
---|---|
T |
Constructors
SFArrayList()
Overloaded. Initializes a new instance of the SFArrayList class that is empty and has the default initial capacity.
Declaration
public SFArrayList()
SFArrayList(ICollection<T>)
Initializes a new instance of the SFArrayList class that contains elements copied from the specified collection and has the same initial capacity as the number of elements copied.
Declaration
public SFArrayList(ICollection<T> c)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<T> | c | The System.Collections.ICollection whose elements are copied to the new list. |
Properties
Item[Int32]
Gets / sets the element at the specified index. In C#, this property is the indexer for the SFArrayList class.
Declaration
public T this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get / set. |
Property Value
Type | Description |
---|---|
T | The element at the specified index. When querying the value and the index is out of range, an empty (null) object will be returned. When setting the value and the index is out of range the array will be enlarged. See SFArrayList.EnsureCount |
Methods
Clone()
Overridden. Creates a deep copy of the SFArrayList.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A deep copy of the SFArrayList. |
Clone(Object)
Overridden. Creates a deep copy of the SFArrayList.
Declaration
public object Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for the new items. |
Returns
Type | Description |
---|---|
System.Object | A deep copy of the SFArrayList. |
EnsureCount(Int32)
Enlarges the array if needed.
Declaration
public void EnsureCount(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The size to be checked. If the array has less elements, empty (null) objects will be appended at the end of the array. |