我正在处理以下代码
SpeechRecognizer sr2 = new SpeechRecognizer();
...
sr2.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(sr2_SpeechRecognized);
...
void sr2_SpeechRecognized(object sender, SpeechRecognizedEventArgs e){}
在这里,第一个代码显示语音识别器的初始化,第二个代码显示注册到事件处理程序,第三个代码显示事件处理程序。
现在,我需要删除这个事件处理程序。我怎样才能做到这一点?