VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > temp > C#教程 >
  • c#去掉字符串中的回车符

制作者:剑锋冷月 单位:无忧统计网,www.51stat.net
 

  先转换成streamreader类的对象,去掉回车符,再转换回来

 StreamReadersr=newStreamReader(this.textBox1.Text,System.Text.Encoding.Default);
  this.textBox2.Text=sr.ReadToEnd().Replace((char)10,'').Replace((char)13,'');
  this.textBox2.SelectAll();
  sr.Close();



相关教程