System.Windows.Forms.CommandBarItemCollection.this C# (CSharp) Method

this() private method

private this ( char mnemonic ) : System.Windows.Forms.CommandBarItem[]
mnemonic char
return System.Windows.Forms.CommandBarItem[]
        internal CommandBarItem[] this[char mnemonic]
        {
            get
            {
                ArrayList list = new ArrayList();

                foreach (CommandBarItem item in items)
                {
                    if ((item.IsVisible) && (item.IsEnabled))
                    {
                        string text = item.Text;
                        for (int i = 0; i < text.Length; i++)
                        {
                            if ((text[i] == '&') && (i + 1 < text.Length) && (text[i + 1] != '&'))
                            {
                                if (mnemonic == Char.ToUpper(text[i + 1], CultureInfo.InvariantCulture))
                                {
                                    list.Add(item);
                                }
                            }
                        }
                    }
                }

                CommandBarItem[] array = new CommandBarItem[list.Count];
                list.CopyTo(array, 0);
                return array;
            }
        }

Same methods

CommandBarItemCollection::this ( int index ) : CommandBarItem
CommandBarItemCollection::this ( Keys shortcut ) : System.Windows.Forms.CommandBarItem[]