Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
How to write a binary file using C# and .NET. The Write overloaded method is used to write primitive data types to a stream. The Write method can write a Boolean, Byte, Char, Decimal, Double, and Integer data types.
Learn how to read a binary file in C# and .NET. The Read overloaded method writes primitive data types to a stream. The Write method can write Boolean, Byte, Char, Decimal, Double, and Integer data types.
Learn how to create and write binary files in C# with System.IO.BinaryWriter, including writing primitive values to a stream and selecting character encoding.
How to check when a file was created in C#. The CreationTime property returns the DateTime when a file was created.
Code snippet in C# how to read and set file creation time in C#.
In this article we will discuss about how to Set File Last Write Time in C#.
Here is a code example to get the Last Write Time of a file in C#.
File class provides a method to ecrypt a file. Learn how to Encrypt a File in C#.
C# File Class. In this article, I'll explain how to use File class in C# to create, move, and work with files in .NET.
Learn how to read a text file in C# using the File class and its methods.
Build a C# Windows Forms utility that searches selected drives for files by extension using the System.IO namespace.
Learn how to use FileInfo.Replace in C# to replace an existing file, create a backup, and handle metadata merge errors.
Learn how to open, read, write, and asynchronously access files in C# using File.Open, File.OpenRead, and FileStream.
Learn how to use File.CreateText in C# to create or overwrite UTF-8 text files, write content with StreamWriter, and work with the current directory.
This article will explain the DirectoryInfo class and its uses and how to work with folders in C#.
Code sample to show how to create a file in C# and get a file attributes such as file creation time, file size, file last updated, file last accessed, and file last write time.
How to move a directory using C# and .NET. The Directory.Move method moves an existing directory to a new specified directory with full path.
How to get full path of a file using C# and .NET. The FullName property returns just the full path of a file including the file name.
How to check if a file is read only in C#. The IsReadOnly property of the FileInfo class returns if a file is read only.
How to check if a file exists in C# and .NET. The Exists property of the FileInfo class returns true if a file exists.
How to delete a directory in C# and .NET. The System.IO.Directory class in the .NET Framework class library provides static methods for creating, copying, moving, and deleting directories and subdirectories.
This article provides a sample of retrieving file system directories iteratively.
In this article, you will learn how to work with classes in the System.IO namespace for reading data from and writing data to files.
This article defines how to retrieve values from Log files and Event Log View.
Build an ASP.NET Web Forms directory browser with C# using DirectoryInfo and FileInfo to list folders and files and navigate into subdirectories.
This Directory Picker in this article is also a bit different because it uses the Large Icon view of the ListView to traverse through directories.
This article explains about the FileInfo and DirectoryClass in the System.IO namespace. The sample application demonstrates how it works.
In this article we will see how we can write something into the file & how we can append our data into an already existing file.
Everything on Files, Directory, IO, not only its articles: the Files, Directory, IO page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article