private Door findNamedDoor(string name) { foreach (Door door in SelectedRoom.Doors) { if (door.name == name) { return door; } } return null; }