Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CopyTo() [1/2]

void System.Data.RBTree< K >.CopyTo ( Array array,
int index )
inline

Definition at line 1280 of file RBTree.cs.

1281 {
1282 if (array == null)
1283 {
1284 throw ExceptionBuilder.ArgumentNull("array");
1285 }
1286 if (index < 0)
1287 {
1288 throw ExceptionBuilder.ArgumentOutOfRange("index");
1289 }
1290 int count = Count;
1291 if (array.Length - index < Count)
1292 {
1293 throw ExceptionBuilder.InvalidOffsetLength();
1294 }
1295 int num = Minimum(root);
1296 for (int i = 0; i < count; i++)
1297 {
1298 array.SetValue(Key(num), index + i);
1299 num = Successor(num);
1300 }
1301 }
K Key(int nodeId)
Definition RBTree.cs:1407
int Successor(int x_id)
Definition RBTree.cs:400
int Minimum(int x_id)
Definition RBTree.cs:447

References System.Data.ExceptionBuilder.ArgumentNull(), System.Data.ExceptionBuilder.ArgumentOutOfRange(), System.array, System.Data.RBTree< K >.Count, System.count, System.index, System.Data.ExceptionBuilder.InvalidOffsetLength(), System.Data.RBTree< K >.Key(), System.Data.RBTree< K >.Minimum(), System.Data.RBTree< K >.root, and System.Data.RBTree< K >.Successor().

Referenced by System.Data.DataRowCollection.CopyTo(), and System.Data.DataRowCollection.CopyTo().