

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Program to create new directories
Use the CreateDirectory method to create a directory.
Let’s say you need to create a directory in D drive. For that, use the CreateDirectory() method as shown below −
Directory.CreateDirectory("D:\\Tutorial");
The following is the code −
Example
using System.IO; using System; public class Program { public static void Main() { Directory.CreateDirectory("D:\\Tutorial"); } }
- Related Questions & Answers
- Create directories recursively in Java
- How to create directories (hierarchically) in Java?
- Create, Delete and Change Directories in Perl
- How to get all the directories and sub directories inside a path in C#?
- C Program to list all files and sub-directories in a directory
- How to create Directories using the File utility methods in Java?
- Directories in Python
- Listing out directories and files using C#
- How to create new alias with PowerShell?
- How to create a new Canva account?
- C# Program to create a LinkedList
- Alternate bits of two numbers to create a new number in C++
- How to create JavaScript objects using new operator?
- How to create a new database in MongoDB?
- How to create a new collection in MongoDB?
Advertisements