March 18th, 2014, 07:27 PM
Starting a Project Where I know I'll want to reuse my functions in other programs
Disclaimer: I'm not new to programming, but still quite the novice in C#. Background heavy in VB6.
Scenario: I'm going to start a new project that does a bunch of Astronomical calculations. I know that many of the functions that I'm going to write for this project I will want to use again for other projects down the road.
In VB6, I would simply create a MODULE and add a bunch of GLOBAL functions and subroutines. This MODULE can then be loaded into any future VB6 project to allow me to reuse that code.
In VS2010 C#, I'm not sure what the equivalent of doing this happens to be. When I do a search on "creating a library" in C#, like when I would do so in C and use "include..." statements to add 'header' files like "mystuff.h", it appears that the word "library" carries a different meaning in C# as it gives me all kinds of information on creating DLL's.
I don't want to create a DLL. I just want an easy way to reuse my code in one app in another app.
QUESTION: To reuse functions written for one application in future applications, what is the 'best practice' approach to do this?
Is this adding a CLASS? Do I have to do something called DELEGATES?
I'm puzzled about how to start.
I don't want to start writing this project one way only to find out that I should have started another way. So that is why I am asking now BEFORE I start adding any files or code to my new project.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!