public InsertRange ( int startingAt, IEnumerable models ) : void | ||
startingAt | int | Index to start inserting at (0-based). |
models | IEnumerable | A collection models. |
Résultat | void |
public void InsertRange(int startingAt, IEnumerable models)
{
// Setup initial conditions.
if (Script.IsNullOrUndefined(models)) return;
if (startingAt < 0) startingAt = 0;
// Insert each item.
foreach (object model in models)
{
Insert(startingAt, model);
startingAt++;
}
}