小编Xav*_*ier的帖子

在C#中管理文本文件

好的,所以我有一个带有示例内容的文本文件

line1with some random stuff here
line 2 with something very completely different
line3 has some other neat stuff
line4 is the last line in the textfile
Run Code Online (Sandbox Code Playgroud)

我需要获取该文本文件,删除一行,并保留文件的REST.所以如果我想删除第2行,id想要一个这样的结果:

line1with some random stuff here
line3 has some other neat stuff
line4 is the last line in the textfile
Run Code Online (Sandbox Code Playgroud)

请注意,我不希望线之间留下任何空间.

〜代码示例请!即使这是不可能的,任何帮助将不胜感激!:)

c# text file

2
推荐指数
1
解决办法
657
查看次数

标签 统计

c# ×1

file ×1

text ×1