c#怎样实现下面生成的txt中的内容自动换行???
来源:百度知道 编辑:UC知道 时间:2024/05/18 01:04:55
string hebe = @"C:\pathlog.txt";
File.AppendAllText(hebe, comboBox2.Text );
pathlog.txt中的内容总紧凑在一起,怎样实现第二次写入时另起一行写入呢???
File.AppendAllText(hebe, comboBox2.Text );
pathlog.txt中的内容总紧凑在一起,怎样实现第二次写入时另起一行写入呢???
在TextBox中实现换行的方法如下:
(1)在Visual Studio中添加一个“Windows 窗体应用程序”项目
(2)在Form上添加2个TextBox和1个Button
设置textBox1的属性
Multiline = True
ScrollBars = Both
(3)Form1窗体代码Form1.cs
using System;
using System.Windows.Forms;
namespace BaiduWinformApp
{
public partial class Form1 : Form
&