索引字符串--问题 我要索引一句话中的两个字符串,比如:”*** 欢迎来到***世界”中间的两部分*号部分分别查出来付给变量(*号部分字符长度会变,其它的不会变),请帮忙附代码,并加一下注释!谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string strTest = "***欢迎来到***世界";strTest = strTest.Replace("欢迎来到", ",");strTest = strTest.Replace("世界", string.Empty);string[] strValues = strTest.Split(','); string strTest = "***欢迎来到***世界";strTest = strTest.Replace("欢迎来到", ",");strTest = strTest.Replace("世界", string.Empty);string[] strValues = strTest.Split(','); 不是吧?都这程度了还不行吗string strTest = "***欢迎来到***世界";strTest = strTest.Replace("欢迎来到", ",");strTest = strTest.Replace("世界", string.Empty);string[] strValues = strTest.Split(',');string strValue1;string strValue2;if(strValues != null && strValues.Length == 2){ strValue1 = strValues[0]; strValue2 = strValues[1];} label如何显示系统时间 执行存储过程以网格显示的快捷键是啥 C#中使用COM组件的问题 C# 中的一个简单控件怎么用??? 关于软件注册的问题,请教各位高手,进来有分 小问题:如何取得一个表中的最后3条记录? 大家给出好点的电子图书,建ftp,完全免费的下载 老大们!!!救急啊,回传值的问题!!!!! 求问:chart控件中怎么清除Series中的数据 combox WinForm程序如何连接Windows服务 关于hashtable的问题
strTest = strTest.Replace("欢迎来到", ",");
strTest = strTest.Replace("世界", string.Empty);
string[] strValues = strTest.Split(',');
strTest = strTest.Replace("欢迎来到", ",");
strTest = strTest.Replace("世界", string.Empty);
string[] strValues = strTest.Split(',');
strTest = strTest.Replace("欢迎来到", ",");
strTest = strTest.Replace("世界", string.Empty);
string[] strValues = strTest.Split(',');string strValue1;
string strValue2;
if(strValues != null && strValues.Length == 2)
{
strValue1 = strValues[0];
strValue2 = strValues[1];
}