I have a file .csfull of C # code. I continue to reuse in several projects.
Now I include it in these projects, copying and pasting the code into a new file in each project directory. This is the wrong way to do this.
What is the right way to do this?
The correct path should:
- save the shared code in only one place on my computer.
- and keep the connection fresh --- therefore, when the general code changes, every project knows about it, the next time I recompile this project.
By chance guessing, I would expect some sort of directive like using mycode = C:\common\mycode.cs, but I'm sure this is not a .NET way of doing things.
(I use C # 2010, .NET 4.0 and only compile this code locally on one computer.)
source
share