📂 C# File I/O Interactive Tutorial

📖 Reading Files

🔍 Tip: Always wrap file I/O operations in try-catch to handle exceptions like FileNotFoundException.

📝 Writing to Files

📄 Interactive: Write & Read File

📖 File Content:

File content will appear here...
💡 StreamWriter overwrites by default. To append, pass true as the second argument.

🗑️ Deleting Files

🧠 File I/O Quiz

1. Which class is used to read from a file in C#?




2. How do you append content to a file?




3. What exception is thrown when a file is not found?




4. Which method deletes a file?