1
我在使电报机器人!!!有问题,这是错误! CS0029 Cannot implicitly convert type 'string[][]' to 'NetTelegramBotApi.Types.KeyboardButton[][]
使电报机器人错误
注意:我使用C#来制作机器人!
请帮助 感谢
我在使电报机器人!!!有问题,这是错误! CS0029 Cannot implicitly convert type 'string[][]' to 'NetTelegramBotApi.Types.KeyboardButton[][]
使电报机器人错误
注意:我使用C#来制作机器人!
请帮助 感谢
错误日志只说你把string
为KeyboardButton
,请产生KeyboardButton。
您可以使用下面的代码:
mainMenu = new ReplyKeyboardMarkup {
Keyboard = new KeyboardButton[][] {
new KeyboardButton[] {
new KeyboardButton("Your Text")
}
}
};
您可以添加更多的代码和解释?到目前为止,这是非常模糊的 – Frederic
它看起来像你试图将一个字符串类型的数组分配给一个KeyboardButton类型的数组。它们不是同一类型;这是一个无效的转换。如果没有问题的代码示例,我们无法帮助您解决问题。 –