Xamarin.ios 蒙图奇uitextfield的类型转换?
我需要创建UITextField作为从服务获取的字符串的名称。 我试着用下面的方法Xamarin.ios 蒙图奇uitextfield的类型转换?,xamarin.ios,uitextfield,Xamarin.ios,Uitextfield,我需要创建UITextField作为从服务获取的字符串的名称。 我试着用下面的方法 string name = "Sample"; UITextField name = new UITextField(); 但我得到了已经定义的数据类型错误 请给我答案 提前感谢您,您不能有两个名称相同的变量。这是一个普遍的C#语法问题 如果您这样做,它是否有效: string name = "Sample"; UITextField nameField = new UITextField(); ya str
string name = "Sample";
UITextField name = new UITextField();
但我得到了已经定义的数据类型错误
请给我答案
提前感谢您,您不能有两个名称相同的变量。这是一个普遍的C#语法问题 如果您这样做,它是否有效:
string name = "Sample";
UITextField nameField = new UITextField();
ya string name=“Sample”;UITextField nameField=新的UITextField();如果解决了你的问题,人们通常会投票或将答案标记为已解决。我刚注意到你对stackoverflow很陌生。