JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Common exceptions when working with files

    C# SELF
    38 level,0 lecture
    In this lecture we'll go through the most common exceptions when working with files in C#: from FileNotFoundException and UnauthorizedAccessException to the general IOException. You'll learn when they happen, how to handle them properly with try-catch, what quirks to consider on Windows, Linux and macOS, and you'll get practical tips, cheat-sheet tables and a flowchart for handling errors.
    Open
  • Catching file exceptions ( try-catch)

    C# SELF
    38 level,1 lecture
    In this lecture you'll learn how to work with files safely in C#: how to properly use try-catch, choose the right catch blocks, handle common errors ( FileNotFoundException, UnauthorizedAccessException, IOException, etc.), implement retries and avoid common pitfalls. Everything is shown with clear examples and practical recommendations.
    Open
  • Checking for the presence of a file/folder

    C# SELF
    38 level,2 lecture
    In this lecture you'll learn how to safely work with the file system in .NET: check for the existence of files and directories with File.Exists and Directory.Exists, correctly build paths with Path.Combine, create missing folders, and avoid common mistakes when reading/writing. Everything with practical examples.
    Open
  • Corrupted Files and Encodings

    C# SELF
    38 level,3 lecture
    In this lecture we dig into why reading text files in .NET can throw encoding errors, how corrupted data shows up, and what to do when you hit exceptions like DecoderFallbackException and EncoderFallbackException. We'll talk about the BOM, Encoding settings, fallback strategies, the correct use of StreamReader/ StreamWriter, and practical tips for handling errors.
    Open
  • Safe file reading and writing

    C# SELF
    38 level,4 lecture
    A practical guide to safely working with files in C# and .NET: checks for existence and permissions, proper closing of streams with using, error handling with try-catch, path validation, managing sharing ( FileShare), atomic writes via File.Replace, and when wrappers like File.ReadAllText/ File.WriteAllText make sense. We'll go over common cases, exceptions like IOException, and show reliable patterns with code examples.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy