Jimmy,
All functions must be members of a class, so you can either create a class
and make the functions members of it, then instantiate the class into an
object and call them, or move them into a Dll, annd essentially do the same
thing. Below is a way to move them into a Dll.
1) Try using: New->Project & choose Class library. This will create a Dll
assembly project. Put your functions in there as members of a class (or
classes, which ever makes the most organization sense).
2) I'm not certain "best way" can be answered directly, because the next
step depends upon the answer to the following question: Do you need to
dynamically load the Dll at run time, or can you statically access it?
I'll deal with the static approach, as it's easier, and should get you
started:
3) In your client app, set a reference to the Dll project.
4) Add an appropriate "using" statement at the top of your code file that
will be calling the Dll function(s) to include the namespace you set up in
the Dll. This assumes the namespace you created in the Dll is different from
the client app's namespace. If they share the same namespace, you won't need
this step.
5) Instantiate the object(s) you put into the dll and call the method(s) on
the object(s) in the client app. You don't have to do anything special
besides setting the reference and including the namespace.
If you need to dynamically load the Dlll and then retrieve the method(s) of
interest, this is more complicated and can become rather long winded. I'll
take a short cut on this one and recommend you look up"Loading Assemblies
into an Application Domain", "MethodInfo class" and then "Reflection" for
starters in MSDN. Those aught to point you in the right direction.
Hope this helps & good luck.