DLL类及其访问 [英] DLL classes and their access
问题描述
没有一个DLL(动态链接库)包含一个以上的班?如果它包含了如何单独获取类及其方法。NET在C#
does a DLL(dynamic linking library) contains more than one class? if it contains how to get the classes and their methods separately in .net in c#
推荐答案
呵呵yes.A DLL可以容纳许多classes.You可以创建一个类的对象,并调用它的方法或使用ClassName.MethodName()方法如果它的一个静态类。
Oh yes.A dll can hold many classes.You can create an object of the class and invoke the methods of it OR use the ClassName.MethodName() approach if its a static class.
一个类库可以包含任意数量classes.You可以创建一个类重新presenting每个实体的应用程序(例如:学生,课程...)。
A class library can contain any number of classes.You can create a class for representing each entity in the app.(Ex: Student,Course..)
例如:
MyStudent objStudent=new MyStudent(); // creating object
objStudent.GetUser("somename"); // calling method
另一个类的类库调用方法
calling method of another class in the class library
MyCourse objCourse=new MyCourse (); // creating object
objCourse.GetCourse("english"); // calling method
OR(静态)
OR (for Static)
MyStudent.GetUser("somename")
MyCourse..GetCourse("english");
这篇关于DLL类及其访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!