class TestAssembly
{
static void Main()
{
try
{
System.Reflection.AssemblyName testAssembly =
System.Reflection.AssemblyName.GetAssemblyName(@"C:/WINDOWS/system/avicap.dll");
System.Console.WriteLine("Yes, the file is an Assembly.");
}
catch (System.IO.FileNotFoundException e)
{
System.Console.WriteLine("The file cannot be found.");
}
catch (System.BadImageFormatException e)
{
System.Console.WriteLine("The file is not an Assembly.");
}
catch (System.IO.FileLoadException e)
{
System.Console.WriteLine("The Assembly has already been loaded.");
}
}
}