Check if DirectoryInfo.Parent is null or not
DirectoryInfo d = new DirectoryInfo("");
if(d.Parent == null) { IsRoot = true; }
you can also get the root by using DirectoryInfo.Root;
Check if DirectoryInfo.Parent is null or not
DirectoryInfo d = new DirectoryInfo("");
if(d.Parent == null) { IsRoot = true; }
you can also get the root by using DirectoryInfo.Root;