public static GetRoot ( string path ) : string | ||
path | string | |
Résultat | string |
public static string GetRoot(string path)
{
if (String.IsNullOrEmpty(path))
return String.Empty;
return path.Split(new[] { '\\', '/' }, StringSplitOptions.RemoveEmptyEntries)[0];
}