Sorry, but you canโt do this, itโs good to know that Delphi provides such a tool, but Visual Studio may not do this, because at the end of the day it can lead to a mess of related files. Visual studio likes to organize related files in one project or solution.
If you want your previous class to be accessible as described above, you have only two options.
1) Just copy the existing .cs file to the project directory (by right-clicking on the project โ โAdd existing itemโ โ select a class)
2) Add the project to your solution (right-click on the Solution โ Add โ Add Existing Project ... โ Select the project file from the file browser), and then add the refrence class (right-click on the project โ โAdd Linkโ โ Projects tab Select your project). It will automatically make a link to the .dll.
3) And the last option is to compile your class into a .dll, and then add a link to it in Project.
Luck
source share