Find() public méthode

public Find ( string key, bool searchAllChildren ) : System.Windows.Forms.MenuItem[]
key string
searchAllChildren bool
Résultat System.Windows.Forms.MenuItem[]
Exemple #1
0
        public void MenuItemCollection_Find_NullOrEmptyKey_ThrowsArgumentNullException(string key)
        {
            var menu       = new SubMenu(new MenuItem[0]);
            var collection = new Menu.MenuItemCollection(menu);

            Assert.Throws <ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: false));
        }
Exemple #2
0
        public void MenuItemCollection_Find_Invoke_ReturnsExpected(MenuItem[] items, string key, bool searchAllChildren, MenuItem[] expected)
        {
            var menu       = new SubMenu(items);
            var collection = new Menu.MenuItemCollection(menu);

            Assert.Equal(expected, collection.Find(key, searchAllChildren));
        }