好的,假设我有一个类似这样的应用程序:
using System;
using AliensExist; // some DLL which can't be found...
我希望的是,如果程序集DLL AlienExist无法找到,应用程序不会返回错误,而是被“trycatched”(类似于捕获异常)...
using System;
try{
using AliensExist; // some DLL which can't be found...
} catch {}
如何实现?我知道使用关键字不能稍后使用...但现在我太懒了,不想测试。
非常感谢!
using
不指定 dll。它指定了使用的命名空间,该命名空间可以在多个程序集(dll)中定义。 - Ladislav Mrnka