不能将字符串转换为字符[]错误xamarin android
问题描述:
string hello = "hello";
for (int i = 0; i < 2; i++)
{
CheckBox ch = new CheckBox(this);
ch.SetText(hello);
layout.AddView(ch);
}
我看到几个线程在stackoverflow他们能够做到上述步骤不能我在xamarin android吗? ch.SetText(hello); 我得到错误不能将字符串转换为字符[]错误xamarin android
答
使用Text属性
ch.Text = hello;
应该能够使用hello.ToCharArray() – Joagwa
你什么错误?你期望我们猜测什么? – perror