Thread: C# DLL
View Single Post
  #4 (permalink)  
Old December 1st, 2008, 08:13 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

How are the methods defined? Like this:

public static void MethodName() {}

or this:

public void MethodName() {}

Only methods declared with the static keyword can be called like this:

Code:
TheClass.SomeMethod();
Otherwise you need to do something like this (these are known as instance methods):

Code:
TheClass class = new TheClass();
class.SomeMethod();
Methods declared with private or intern won't be accessible. In the case of the latter, this will only be true if the class within the DLL is in a different namespace then the calling class.

hth.
-Doug

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
Reply With Quote