用VS C#2005启动CS文件,怎样引用动态链接库?

来源:百度知道 编辑:UC知道 时间:2024/05/24 07:14:07
我编译好了一个动态链接库,链接库中包含了几个类。请问我在Visual Studio C#2005 环境下,怎么使一个CS文件引用我编好的动态链接库生成EXE文件。

open vs2005
file->open->project/solution
in solution explorer,
select your project/solution
rightclick->add reference->browse
if possible, you can add a bin foldor under your project
then
select your project/solution
rightclick->add reference->project

在你代码文件(.cs)头部使用Using+DLL的namespace就行了。

举个例子来说:
Using System.IO
其实就是应用.NET Framework某个DLL的System.IO命名空间,

你自己引用自己的DLL道理一样