System.Data.RecordManager.NewCapacity C# (CSharp) Method

NewCapacity() static private method

static private NewCapacity ( int capacity ) : int
capacity int
return int
        internal static int NewCapacity(int capacity) =>
            (capacity < 128) ? 128 : (capacity + capacity);

Usage Example

Example #1
0
 private void GrowRecords()
 {
     int[] newRecords = new int[RecordManager.NewCapacity(recordCount)];
     System.Array.Copy(records, 0, newRecords, 0, recordCount);
     records = newRecords;
 }