请教高手,我想取一个物料编码如 01.001.001 最后一个点号前面的部分 01.001 ,谢谢 请教高手,我想取一个物料编码如 01.001.001 最后一个点号前面的部分 01.001 ,谢谢如 01.002.001 取01.002 111.01.002.001 取111.01.002 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string s = "111.01.002.001"; string[] ss = s.Split('.'); s = ""; for (int i = 0; i < ss.Length-1; i++) { s += ss[i]+"."; } textBox1.Text = s.Trim('.'); string str = "111.01.002.001"; Console.WriteLine(str.Substring(0, str.LastIndexOf(".001")));/*111.01.002请按任意键继续. . .*/ string str="111.01.002.001";str=str.substring(0,str.LastIndexOf(".")); SqlConnection进行开关的问题 兄弟姐妹进来 请教各位一个汉字转换的问题? 保存MHT文件的问题! 问两个问题,请大家提供思路,能帮忙的另有重谢!回帖有分! 如何画虚线? “System.Data.SqlClient.SqlParameter”不包含“GetEnumerator”的公共定义,因此 foreach 语句不能作用 foreach在windfrom中的问题 怎样操作快捷方式? 如可屏蔽alt + f4? 做一个网站................... 怎末在bs程序中传递值给已运行的cs程序?
string s = "111.01.002.001";
string[] ss = s.Split('.');
s = "";
for (int i = 0; i < ss.Length-1; i++)
{
s += ss[i]+".";
}
textBox1.Text = s.Trim('.');
Console.WriteLine(str.Substring(0, str.LastIndexOf(".001")));
/*
111.01.002
请按任意键继续. . .
*/
str=str.substring(0,str.LastIndexOf("."));