Пример #1
0
 /// <summary>
 /// Constructor that creates an ArrayLink&lt;TValue&gt; of
 /// the requested size.
 /// </summary>
 /// <param name="initialSize">Requested size of the Collection.</param>
 public LinkedArray(int initialSize)
 {
     _root = new ArrayLink <TValue>(0, initialSize);
 }
Пример #2
0
        /// <summary>
        /// Constructor that accepts an ICollection&lt;TValue&gt; containing
        /// values to initialize the collection starting at key = 0.
        /// </summary>
        /// <param name="collection">Values to initialize the collection.</param>
        public LinkedArray(ICollection <TValue> collection)
        {
            _root = new ArrayLink <TValue>(0, Math.Max(collection.Count, ArrayLink <TValue> .InitialSize));

            AddRange(collection);
        }
Пример #3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <remarks>
 /// Initializes the collection with a
 /// root ArrayLink&lt;TValue&gt;.
 /// </remarks>
 public LinkedArray()
 {
     _root = new ArrayLink <TValue>(0, ArrayLink <TValue> .InitialSize);
 }