- Joined
- Oct 31, 2013
- Messages
- 172
- Reaction score
- 24
- Points
- 18
Этот код удаляет пустые строки в файле, что надо сюда дописать что бы он сразу удалял дубли в этом же файле?
// Delete blank lines from file
string path = project.Variables["puth"].Value; // Gets file path from your project variable with name "filePath"
var lines = System.IO.File.ReadAllLines(path).Where(arg => !string.IsNullOrWhiteSpace(arg));
System.IO.File.WriteAllText(path, string.Join(Environment.NewLine, lines));
return 0;
// Delete blank lines from file
string path = project.Variables["puth"].Value; // Gets file path from your project variable with name "filePath"
var lines = System.IO.File.ReadAllLines(path).Where(arg => !string.IsNullOrWhiteSpace(arg));
System.IO.File.WriteAllText(path, string.Join(Environment.NewLine, lines));
return 0;