C# 去掉代码前边空格(格式化代码)
2021-03-29 17:26
标签:.text box span color str col 格式 button string C# 去掉代码前边空格(格式化代码) 标签:.text box span color str col 格式 button string 原文地址:https://www.cnblogs.com/enych/p/9295839.html private void button1_Click(object sender, EventArgs e)
{
textBox2.Text = "";
string str = "";
foreach (string s2 in textBox1.Lines)
{
if(s2==""){
continue;
}
str += s2.Trim()+"\r\n";
}
textBox2.Text = str;
}