我正在嘗試制作一個(gè)允許用戶將數(shù)據(jù)導(dǎo)出到 txt 的程序,但是我想首先詢問用戶創(chuàng)建 txt 的路徑是什么。但是我沒有正確使用替換功能,我正在添加一個(gè)變量。對不起,如果這是一個(gè)愚蠢的問題。我嘗試過的:string path = @"##Insert##\export.txt";Console.WriteLine("Insert the path to export txt: ");string temp = Console.ReadLine();path = path.Replace($"##Insert##", "{temp}");
詢問用戶導(dǎo)出txt文件的路徑c#
人到中年有點(diǎn)甜
2021-12-05 17:05:48