System.Windows.Forms.MenuItem.ProcessMnemonic C# (CSharp) Метод

ProcessMnemonic() приватный Метод

private ProcessMnemonic ( ) : void
Результат void
		private void ProcessMnemonic ()
		{
			if (text == null || text.Length < 2) {
				mnemonic = '\0';
				return;
			}

			bool bPrevAmp = false;
			for (int i = 0; i < text.Length -1 ; i++) {
				if (text[i] == '&') {
					if (bPrevAmp == false &&  (text[i+1] != '&')) {
						mnemonic = Char.ToUpper (text[i+1]);
						return;
					}

					bPrevAmp = true;
				}
				else
					bPrevAmp = false;
			}

			mnemonic = '\0';
		}