directory - C# How to know if a given path represents a root drive? -


how can know if given directory root drive?

(aside checking if path equals "a:", "b:", "c:", etc.)

check if directoryinfo.parent null or not

directoryinfo d = new directoryinfo(""); if(d.parent == null) { isroot = true; } 

you can root using directoryinfo.root;


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -