If I Add A Reference Dll To A C# Project, How Would I Declare A New Instance Of The Class And Use Its Function?
If i add a reference DLL to a C# project, how would i declare a new instance of the class and use its functions?
Tags: Class, Declare, Function, Instance, Project, Reference, Would
This entry was posted
on Sunday, July 26th, 2009 at 5:38 am and is filed under dll errors.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
add a using directive above the class in which you want to use the component. It should look like this:
using ComponentNamespace; // name of the namespace for the DLL
in your code you can now create an instance like this:
ComponentNamespace.ComponentClass class = new ComponentNamespace.ComponentClass();
the “class” variable now holds an instance of the class, on which you can call class methods, e.g.,
object o = class.ThisMethod(parameter1,parameter2);
where ThisMethod accepts 2 parameters and returns a result of type object.
Hi,Chris
There are 3 step to repair DLL error
If you got DLL error then there is a 94% chance that your computer has registry problems. To repair DLL error you need to follow the steps below:
* Step 1 – Download a Perfect Optimizer,install this error repair tool.
* Step 2 – Click the Repair All Button.It will scan you pc for Free.
* Step 3 – Then click the Repair All Button again and your done! It is very easy to repair DLL error.
Here are the url of Perfect Optimizer:http://www.fixesdllerrors.com/tidpp-DLL_…