- using System;
- using System.IO;
- namespace forgetCode
- {
- class Program
- {
- static void Main(string[] args)
- {
- string path = "D:\\test.txt";
- if (File.Exists(path))
- {
- string content = File.ReadAllText(path);
- Console.WriteLine("Current content of file:");
- Console.WriteLine(content);
- }
- }
- }
- }