Delete Dir - CSharp System.IO

CSharp examples for System.IO:DirectoryInfo

Description

Delete Dir

Demo Code


using System.IO;/* w w w  .  j a v  a2  s.c o  m*/
using System;

public class Main{

        public static bool DeleteDir(string dirFullPath)
        {
            if (Directory.Exists(dirFullPath))
            {
                Directory.Delete(dirFullPath, true);
                return true;
            }
            return false;
        }
}

Related Tutorials