当被引用的程序集装?程序

由网友(我是抄霸)分享简介:我写了一个程序,使引用Microsoft.Web.Administration.dll,这是不是Windows Server 2003上present。I wrote a program that makes a reference to Microsoft.Web.Administration.dll,whic...

我写了一个程序,使引用Microsoft.Web.Administration.dll, 这是不是Windows Server 2003上present。

I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003.

该程序检查操作系统和未引用的DLL如果操作系统是2003。

The program checks for the os and does not reference the dll if the os is 2003.

if(OSVersion == WindowsServer2003)
    //do the job without referencing the Microsoft.Web.Administration.<br>
else if(OSVersion == WindowsServer2008)
   //reference the Microsoft.Web.Administration.dll file.<br>

在我的Windows Server 2003上测试了这个程序,错误发生,告诉我它无法找到Microsoft.Web.Administration.dll。 但是,当我分离的if-else块划分成两个不同的方法如下,并且没有发生错误。

When I tested this program on Windows Server 2003, an error occured telling me it couldn't locate the Microsoft.Web.Administration.dll. But when I separated the if-else block into 2 different methods as below, and the error did not occur.

if(OSVersion == WindowsServer2003)
   //do the job without referencing the Microsoft.Web.Administration.<br>
else if(OSVersion == WindowsServer2008)
   //DoIt2008Style();

所以,我想了解更详细的参考文件加载时间。 你能点我的一些资源?

So I wanted to know about reference file loading time in more detail. could you point me to some resources?

推荐答案

当你输入引用另一个组件的类型的方法。 这里试图延迟加载86时是一个例子, 64集。

When you enter a method that references a type in another assembly. Here is an example when trying to delay load x86 and x64 assemblies.

阅读全文

相关推荐

最新文章