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.
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
Updated