Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.2K+ articles
JavaScript
12.2K+ articles
School Learning
11.5K+ articles
Java
10.8K+ articles
C#
1.9K+ articles
Programming Language
593+ articles
CSharp-File-Handling
63 posts
Recent Articles
Popular Articles
Basics of FileStream in C#
Last Updated: 28 April 2025
The FileStream is a class used for reading and writing files in C#. It is part of the System.IO namespace. To manipulate files using FileStream, you need to create an obje...
read more
Programming Language
C#
CSharp-File-Handling
File.WriteAllLines(String, IEnumerable<String>) Method in C# with Examples
Last Updated: 01 June 2020
File.WriteAllLines(String, IEnumerableString) is an inbuilt File class method that is used to create a new file, writes a collection of strings to the file, and then close...
read more
C#
CSharp-File-Handling
File.WriteAllLines(String, IEnumerable<String>, Encoding) Method in C# with Examples
Last Updated: 01 June 2020
File.WriteAllLines(String, IEnumerableString, Encoding) is an inbuilt File class method that is used to create a new file by using the specified encoding, writes a collect...
read more
C#
CSharp-File-Handling
File.WriteAllLines(String, String[]) Method in C# with Examples
Last Updated: 28 April 2025
File.WriteAllLines(String, String[]) is an inbuilt File class method that is used to create a new file, writes the specified string array to the file, and then closes the ...
read more
C#
CSharp-File-Handling
File.WriteAllLines(String, String[], Encoding) Method in C# with Examples
Last Updated: 28 April 2025
File.WriteAllLines(String, String[], Encoding) is an inbuilt File class method that is used to create a new file, writes the specified string array to the file by using th...
read more
C#
CSharp-File-Handling
C# Program to Get File Time Using File Class
Last Updated: 01 November 2021
Given a file, now our task is to get the file time using the File class. So we use the GetCreationTime() method of the File class. This method is used to find the creation...
read more
C#
Picked
CSharp-File-Handling
CSharp-programs
C# Program to View the Access Date and Time of a File
Last Updated: 01 November 2021
Given a file, our task is to view the date and time of access to a file. So to do this we use the following properties of the FileSystemInfo class:1. CreationTime: This pr...
read more
C#
Picked
CSharp-File-Handling
CSharp-programs
C# - Reading Lines From a File Until the End of File is Reached
Last Updated: 27 December 2021
Given a file, now our task is to read lines from the file until the end of the file using C#. Before reading the lines from a file we must have some data, so first we need...
read more
C#
Picked
C# Programs
CSharp-File-Handling
C# Program to Delete an Empty and a Non-Empty Directory
Last Updated: 30 November 2021
Given a directory(empty or non-empty), now we have to delete the given directory. Here, an empty directory means the directory is present without any files or subdirectori...
read more
C#
Picked
C# Programs
CSharp-File-Handling
C# Program to Check Given Directory Exists or not
Last Updated: 07 January 2022
Given a directory, now our task is to check given directory exists or not. So to this task, we use the Exists() method of the Directory class. This method will return true...
read more
C#
Picked
C# Programs
CSharp-File-Handling
C# Program to Create a Directory
Last Updated: 30 November 2021
A directory is a file system that stores file. Now our task is to create a directory in C#. We can create a directory by using the CreateDirectory() method of the Director...
read more
C#
Picked
C# Programs
CSharp-File-Handling
C# Program To Copy Content Of One File To Another File By Overwriting Same File Name
Last Updated: 19 January 2022
Given a file, now our task is to copy data from one file to another file by overwriting the same file name using C#. So we use the following methods to perform this task:1...
read more
C#
Picked
C# Programs
CSharp-File-Handling
C# Program to Estimate the Size of Folder
Last Updated: 20 December 2021
The size of the folder is a sum of the size of files and subfolders included in the folder. Here, we will learn to calculate the size of any directory using C#. To calcula...
read more
C#
Picked
C# Programs
CSharp-File-Handling
C# Program to Search Sub-Directory in a Given Directory
Last Updated: 24 March 2022
C# is a general-purpose, object-oriented programming language pronounced as “C Sharp”. It is a lot syntactically similar to Java and is easy for users who have knowledge ...
read more
C#
Picked
C# Programs
Geeks Premier League
Geeks-Premier-League-2022
CSharp-File-Handling
C# - FileInfo Class Methods
Last Updated: 09 December 2022
In this article, we will explain the FileInfo class, its methods, properties, etc. The System.IO namespace is one of the most important namespaces we used while we are wor...
read more
C#
Picked
CSharp-File-Handling
1
2
3
4
5
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !