# File

*noun*

say it: **“FYLE”** **/faɪl/**

The C# File class, with static methods to read, write, copy and delete whole files in one call.

## What is **File** in C#?

**File** — A static class containing methods for creating, reading, writing, and managing files.

```csharp
class OrderFile
{
    string Read(string path)
    {
        using StreamReader reader = new(path);
        return reader.ReadToEnd();
    }
}
```

## In a sentence

- “**File**.ReadAllLines read the whole CSV into an array.”

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=3)

Updated: November 9, 2026

## In other subjects

- [File in Java](https://www.ask-codey.com/glossary/file)
- [file in Unix](https://www.ask-codey.com/glossary/file-unix)

Source: https://www.ask-codey.com/glossary/file-c-sharp
