bin leider auch nicht an die nötigen Infos rangekommen, naja, ich habe eine Utilitymethode gecoded ...
public static bool IsFileUsedByOnotherProcess(Exception ex) {
bool isUsedByOtherProcess = false;
if(ex != null && ex is IOException) {
// Check global settings
CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
CultureInfo defaultCulture = GlobalizationUtil.GetDefaultCulture();
if(!currentCulture.DisplayName.
Equals(defaultCulture.DisplayName)) {
// Switch culture
Thread.CurrentThread.CurrentCulture = defaultCulture;
}
isUsedByOtherProcess = Program.FILE_USED_REG_EX.IsMatch(ex.Message);
// Reswitch culture
Thread.CurrentThread.CurrentCulture = currentCulture;
}
return isUsedByOtherProcess;
}