ASK Question

Quick links:
Latest articles
Internship
Members

Languages:
C
C++
C++ STL
Java
Data Structure
C#.Net
Android
Kotlin
SQL

Web:
PHP
Python
JavaScript
CSS
Ajax
Node.js
Web prog.

Programs:
C
C++
DS
Java
C#
Python


Aptitude:
C
C++
Java
DBMS

Interview:
C
Embedded C
Java
SEO
HR

CS Subjects:
CS Basics
O.S.
Networks
DBMS
Embedded Systems
Cloud Computing
Machine learning
CS Organizations
Linux
DOS

More:
Articles
Puzzles
News/Updates


Home » .Net » C# programs

Directory class programs/example in C#.Net



This section contains solved programs/example on C#.Net Directory class like creating directories, sub directories, get the list of directories, sub directories, check, delete directories etc.

List of C# Directory class examples/programs

  1. C# program to get the list of files from given directory.
    In this program, we will learn how to get filenames of given directory using C# code? To get filename of given directory, we have to use static method GetFiles() of Directory class.
  2. C# program to get root directory of given directory.
    In this program, we will learn how to get root directory of given directory using C# code? To get root directory, we have to use static method GetDirectoryRoot() of Directory class.
  3. C# program to search directory in a given directory.
    In this program, we will learn how to search directory in a given directory (path) using C# code? To search directory, we have to use static method GetDirectories() of Directory class.
  4. C# program to get computer drive names of given directory.
    In this program, we will learn how to get computer drive names using C# code? To get computer drive names, we have to use static method GetLogicalDrives() of Directory class.
  5. C# program to get the list of sub-directories of given directory.
    In this program, we will learn how to get the list of sub-directories of given directory using C# code? To get sub-directories, we have to use static method GetDirectories() of Directory class.
  6. C# program to get complete path of current directory.
    In this program, we will learn how to get complete path of current directory using C# code? To get path of current directory, we have to use static method GetCurrentDirectory() of Directory class.
  7. C# program to check given directory exists or not.
    In this program, we will learn how to check given directory is exist or not using C# code? To check directory existence, we have to use static method Exist() of Directory class.
  8. C# program to delete an empty and a non-empty directory.
    In this program, we will learn how to delete or remove directory or sub-directories using C# code? To delete directory, we have to use static method Delete() of Directory class.
  9. C# program to create directory.
    In this program, we will learn how to create directory or sub-directories using c# code? To create directory, we have to use static method CreateDirectory() of Directory class.




Quick links:
C FAQ(s) C Advance programs C/C++ Tips & Tricks Puzzles JavaScript CSS Python Linux Commands PHP Android Articles More...

Was this page helpful? Please share with your friends...

Are you a blogger? Join our Blogging forum.

Comments and Discussions




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com (2015-2018), Some rights reserved.