Reading from a file using ReadAllText() in C#

We can use File.ReadAllText(Filepath) for reading the content of a file.
This is the example:
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);
            }

          
        }
    }
}


Output:
The content will be shown here from D:\\test.txt

..