• 大小: 0.06M
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 反射  d  加载  dLL  

资源简介

反射的加载与卸载,适用于需要经常变换更新的地方。

下面文件路径是编译的路径(需要替换为自己的存放路径),我是将DLL拷贝到EXE文件夹下测试的,在没有卸载完,拷贝覆盖不了,卸载后就可以覆盖了。
D:\2015\TestCode\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

D:\2015\TestCode\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\ClassLibrary1.dll



资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassLibrary1
{
    public class Class1
    {
        public int AddVal(int v1 int v2)
        {
            return v1 + v2+2;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        962  2015-10-29 16:06  WindowsFormsApplication1.sln

    ..A..H.     47104  2015-10-29 16:06  WindowsFormsApplication1.v11.suo

     文件        395  2015-10-29 16:16  说明.txt

     文件       4096  2015-10-29 16:08  ClassLibrary1\bin\Debug\ClassLibrary1.dll

     文件      11776  2015-10-29 16:08  ClassLibrary1\bin\Debug\ClassLibrary1.pdb

     文件        292  2015-10-29 16:08  ClassLibrary1\Class1.cs

     文件       2414  2015-10-29 11:47  ClassLibrary1\ClassLibrary1.csproj

     文件        915  2015-10-29 16:06  ClassLibrary1\ClassLibrary1.sln

    ..A..H.     40448  2015-10-29 16:06  ClassLibrary1\ClassLibrary1.v11.suo

     文件        458  2015-10-29 11:47  ClassLibrary1\obj\Debug\ClassLibrary1.csproj.FileListAbsolute.txt

     文件       1753  2015-10-29 11:47  ClassLibrary1\obj\Debug\ClassLibrary1.csprojResolveAssemblyReference.cache

     文件       4096  2015-10-29 16:08  ClassLibrary1\obj\Debug\ClassLibrary1.dll

     文件      11776  2015-10-29 16:08  ClassLibrary1\obj\Debug\ClassLibrary1.pdb

     文件       6535  2015-10-29 16:03  ClassLibrary1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2015-10-29 11:46  ClassLibrary1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2015-10-29 11:46  ClassLibrary1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2015-10-29 11:46  ClassLibrary1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       1346  2015-10-29 11:46  ClassLibrary1\Properties\AssemblyInfo.cs

     文件        187  2015-10-29 11:45  WindowsFormsApplication1\App.config

     文件       4096  2015-10-29 16:08  WindowsFormsApplication1\bin\Debug\ClassLibrary1.dll

     文件      11776  2015-10-29 16:08  WindowsFormsApplication1\bin\Debug\ClassLibrary1.pdb

     文件       9728  2015-10-29 16:06  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

     文件        187  2015-10-29 11:45  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config

     文件      26112  2015-10-29 16:06  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

     文件      22984  2015-10-29 16:10  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        187  2015-10-29 11:45  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config

     文件        490  2012-06-06 02:06  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件       2075  2015-10-29 16:02  WindowsFormsApplication1\Form1.cs

     文件       2038  2015-10-29 11:50  WindowsFormsApplication1\Form1.Designer.cs

     文件       5817  2015-10-29 11:50  WindowsFormsApplication1\Form1.resx

............此处省略36个文件信息

评论

共有 条评论