File Handling
C# File Handling
Key Concepts
Examples
using System;
using System.IO;
class Program
{
static void Main()
{
string path = "example.txt";
using (StreamReader reader = new StreamReader(path))
{
string content = reader.ReadToEnd();
Console.WriteLine(content);
}
}
}