G
George Straw
I'm attempting to load an arbitrary DLL in a .NET application.
I want to check to determine if it's indeed a .NET assembly, but
I want to do it without throwing a BadImageFormatException, as in
the following:
internal bool IsReallyAGenuineDotNetAssembly(string fileName){
try {
Assembly.LoadFrom(fileName);
return true;
} catch (BadImageFormatException ex) {}
return false;
}
Is there a way to do what I want to do without having to throw
an exception?
GS
I want to check to determine if it's indeed a .NET assembly, but
I want to do it without throwing a BadImageFormatException, as in
the following:
internal bool IsReallyAGenuineDotNetAssembly(string fileName){
try {
Assembly.LoadFrom(fileName);
return true;
} catch (BadImageFormatException ex) {}
return false;
}
Is there a way to do what I want to do without having to throw
an exception?
GS