Users Online

· Guests Online: 95

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

C# Program to Create a Directory

C# Program to Create a Directory

 

 

This is a C# Program to create a directory.

Problem Description

This C# Program Creates a Directory.

Problem Solution

Here a new Directory is created in C directory using createdirectory function.

Program/Source Code

Here is source code of the C# Program to Create a Directory. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.



/*
 * C# Program to Create a Directory
 */
using System;
using System.IO;
class program
{
    public static void Main()
    {
        Directory.CreateDirectory("C:\\NewDirectory");
        Console.WriteLine("NewDirectory is Created in C Directory");
        Console.ReadLine();
 
    }
}
Program Explanation

This C# program is used to create a directory. Here a new Directory is created in C directory using createDirectory() function.

 
Runtime Test Cases
 
NewDirectory is Created in C Directory

 

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 1.09 seconds
10,835,266 unique visits