C#语法错误:'one-of'必须包含至少一个'item'元素 [英] C# Grammar error: 'one-of' must contain at least one 'item' element

查看:213
本文介绍了C#语法错误:'one-of'必须包含至少一个'item'元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作语音助手(类似Cortana或Siri),但现在它无法正常工作。它不想启动,它显示我的语法错误
语法语法= new Grammar(new GrammarBuilder(choices));

I'm making voice assistant (something like Cortana or Siri), but now it isn't working. It doesn't want to start up and it's showing error for my Grammar Grammar grammar = new Grammar(new GrammarBuilder(choices));

错误说: 

Error says: 

System.FormatException:''one-of'必须包含至少一个'item'元素。'

System.FormatException: ''one-of' must contain at least one 'item' element.'

感谢您提出解决此问题的建议

Thank you for your suggestions to fixing this

推荐答案

您好,

 对象是"选择"吗?宣布但空?

 Is the object "choices" declared but empty?

 谢谢:)


这篇关于C#语法错误:'one-of'必须包含至少一个'item'元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆