Share c# class source code between several projects

前端 未结 7 796
遥遥无期
遥遥无期 2020-12-09 00:59

I have written a class that will handle internal logging in my application. Now I want to use this class in another new and totally separate project.

I could simply

7条回答
  •  一整个雨季
    2020-12-09 01:52

    Break your logging code to a seperate assembly.

    You can then include that assembly in the projects that should use that logger.

    It keeps everything nice and clean and you'll only have to maintain one set of code rather than having to worry about each copy.

提交回复
热议问题