且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在使用C#创建的程序中使用dll文件

更新时间:2021-08-18 05:57:35

在您的项目引用中添加该dll.之后,您可以在项目中使用该dll的类和方法.
Add that dll in references of your project. After that you can use classes and methods of that dll in your project.


添加.dll作为引用之后,需要将名称空间添加到自己的项目中(使用.foo.在文档顶部的foo中.)
After adding the .dll as an reference, you need to add the namespace to your own project (using.foo.foo on the top of your document).


在解决方案资源管理器中,右键单击项目"->添加引用"->.单击浏览并浏览ur Dll文件,然后单击确定.现在Dll已添加到ur Project.
为了访问任何方法或成员变量,您需要指定NamespaceName.ClassName.methodName
In solution Explorer right Click Project-->Add Reference--> Click Browse and browse for ur Dll File then click Ok. Now the Dll gets added to ur Project.
In order to access the any method or member varible u need to specify the NamespaceName.ClassName.methodName