1 2 3 4 5 6 7 8 9 10 |
// 判斷 temp.txt 檔案是否存在 string FileName = "temp.txt" ; if (System.IO.File.Exists(FileName)) { MessageBox.Show(FileName + " 檔案存在" ); } else { MessageBox.Show(FileName + " 檔案不存在" ); } |