How to Use Enum in C#

Hi Programmers, welcome to new article of c#.net. This article i’ll write the programs to use Enumerator or Enum in c# console application. The Enum is distinct type that consistsof a set of named constants called the enumerator list. the constant values of enum members are integer type. it start with zero and increase by […]

How to get Information about Files, Folders, and Drive in C#

Hi Programmers, welcome to new article of c#.net. This article i’ll write program to display information about files, folders, and drives using c# console application. For getting files, folders, and drives information we should use FileInfo, DirectoryInfo and DriveInfo class. Create the object of class and call following properties. Let’s write the codes. Directly use […]

How to Check File Exist in C#

Hi programmers, welcome to new post of c#.net. This post i’ll write program to check file exists or not using c# console application. In the code i’m using FileInfo class, It is used with instance methods for the creation, copying, deletion, moving, and opening of files. Its comes under System.IO.FileStream namespace. Next important property i […]

How to Get Create Date and Update Date of File in C#

Hi Programmers, welcome to new post of c#.net. This article i’ll write the codes to get file create date and file update date using c# console application. if any changes occur in files we can easily tract by using FileInfo class and DateTime Structure. Let’s see the Codes. If file invalid or doesn’t exists then […]

How to Get File Name, Path, Directory, Extension in C#

Hi programmers, welcome to new post of c# .net. this article i’ll write codes to print File Name, path , extension ,directory name , create time , update time last access time in c# console application. we should use FileInfo class and create object of FileInfo and call properties. Let’s see the program. Use Directory […]

Display File Name and Path in ListBox Using C# Windows Application

Hi programmers, welcome to new article of c# windows application. This article i’ll write program to Get File Name and Path in ListBox Using C# Windows Application.We can achieve the output OpenFileDialog class and v1 object. v1 call ShowDialog method. when v1.ShowDialog method equals to Cancel then condition true. v1 call filename and stored into […]

Get File Name and File Path in TextBox in C# Windows Application

Hi programmers, welcome to new article of c# windows application. This article i’ll write program to Get File Name and File Path in Textbox in C# Windows Application.We can achieve the output OpenFileDialog class , v1 object calls Filter Property to filter file types. v1 call ShowDialog method. when v1.ShowDialog method equals to OK thencondition […]

How to Open and Save File in C# Windows Application

Hi programmers, welcome to new article of c# windows application. This article i’ll write program to Open and Save File using c# Windows Form. We can achieve the output StreamWriter class , write method ,Random class to Save Files.To Open we should use Stream,OpenDialog classand use ShowDialog method , DialogResult enum, ReadAllText method. In the […]

Count Files from Folder in C#

Hi Programmers, welcome to new post of c#.net. this article i’ll write the programs to count total files from folder using TopDirectoryOnly and AllDirectories enumerations.we can achieve the output using DirectoryInfo class and inside DirectoryInfo we should give Folder path. next we should use FileInfo class d objects calls GetFiles method. star(*) to search all […]