我得到了这个例外:
应用程序调用了为不同线程编组的接口
来自我的代码:
private void Rec_ResultGenerated(SpeechContinuousRecognitionSession sender,SpeechContinuousRecognitionResultGeneratedEventArgs args)
{
switch (args.Result.Text)
{
case "switch one":
status.text="Room 1 light switched"; //Error here
break;
case "switch two":
status.text="Room 2 light switched"; //Error here
break;
default:
break;
}
}
有什么想法吗?