마지막 질문이 명확하지 않으므로 여기 두 번째 시도가 있습니다.콘솔에서 특수 문자를 제거하여 txt 파일로드
"C:\Dokumente und Einstellungen\Bektas\Desktop\test\text1.txt"
어떻게 자동으로 "
문자를 제거 할 수 있습니다 : 나는 드래그하여 콘솔에 내 txt 파일을 삭제하면
, 나는 이런 경로를 얻을? 당신은 자동으로 이런 일을 수행하여 "
문자를 제거 할 수
static void Main(string[] args)
{
String pfad;
String pfad2;
String speichern = "C:\\Dokumente und Einstellungen\\Bektas\\Desktop\\test\\ausgabe.txt";
try
{
Console.WriteLine("Pfad eingeben: ");
pfad = Console.ReadLine();
Console.WriteLine("Pfad eingeben: ");
pfad2 = Console.ReadLine();
// Input
List<String> data = File.ReadAllLines(pfad)
.Concat(File.ReadAllLines(pfad2))
.Distinct().ToList();
// Processing
data.Sort();
// Output
Console.WriteLine("Duplikate entfernt & sortiert:");
data.ForEach(Console.WriteLine);
File.WriteAllLines(speichern, data.ToArray());
}
catch (Exception e)
{
Console.WriteLine("Die Anwendung schlug fehl: {0}\t" + e.ToString());
}
Console.ReadKey();
}
}
당신은 당신의 질문을 지정하세요 수 있을까? 그 숯불을 어디에서 파 내야합니까? –