2014年4月30日 星期三

C# 去掉空格 Textbox 去掉空格

去掉頭尾空格
String s = TextBox1.Text;
s = s.Trim();

去掉全部空格
s = s.Replace(" ","");

沒有留言:

張貼留言