SelectObjects() public méthode

Selects a group of objects from the current node.
public SelectObjects ( string xpath, Type returnItemType ) : Array
xpath string selection expression
returnItemType System.Type array element type to be returned
Résultat System.Array
		public void TestSelectObjects()
		{
			Address address = new Address("Strawberry Street", 45);
			Customer customer1 = new Customer("Rodrigo", "Oliveira", address);
			Customer customer2 = new Customer("Marcia", "Longo", address);

			Customer[] customers = { customer1, customer2 };
			XPathObjectNavigator navigator = new XPathObjectNavigator(customers);
			object[] actual = navigator.SelectObjects("Customer[Address/Number = 45]");
			AssertEquals(2, actual.Length);
			AssertEquals(customer1, actual[0]);
			AssertEquals(customer2, actual[1]);
		}