如何拆分字符串并将值分配给文本框
问题描述:
pubilc void test()
{
string str =name = welcome to codeproject; ok = yes;
}
UI图层:]
名称:文本框(分配给str'分割值'name')
结果将显示为
名称:欢迎来到codeproject
我的尝试:
string str =name =欢迎来到codeproject; ok = yes;
string str1 =name = welcome to codeproject;
string str2 =ok =是;
string str = str1 + str2;
pubilc void test()
{
string str = "name=welcome to codeproject;ok=yes";
}
UI layer:]
Name: textbox(to assign the str splitted value of 'name')
result will be displayed like
Name: welcome to codeproject
What I have tried:
string str = "name=welcome to codeproject;ok=yes";
string str1="name=welcome to codeproject";
string str2= "ok=yes";
string str = str1 + str2;