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: , , , , , ,

2 Responses to “If I Add A Reference Dll To A C# Project, How Would I Declare A New Instance Of The Class And Use Its Function?”

  1. LoverOfW says:

    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.

  2. Christin says:

    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_…

Leave a Reply