public static ExtractTypeLibPath ( string path ) : string | ||
path | string | The path from which to extract the path of the type library. |
Результат | string |
public static string ExtractTypeLibPath(string path)
{
Regex regex = new Regex(@"^.*\\\d+$", RegexOptions.IgnorePatternWhitespace
| RegexOptions.Multiline | RegexOptions.IgnoreCase);
if (regex.IsMatch(path)) {
return path.Substring(0, path.LastIndexOf("\\"));
}
return path;
}