public class Person { public Rectangle boundingBox; public int health; } List personList = new List();
private void CheckBoundingBoxes(List boundingBoxes) { // Do stuff... }
List boundingBoxList = new List(personList.Count); for (int i = 0; i < personList.Count; ++i) { boundingBoxList.Add(personList[i].boundingBox); } CheckBoundingBoxes(boundingBoxList);
CheckBoundingBoxes(new List( personList { boundingBox } ) );