C# Partial Classes

后端 未结 5 1199
盖世英雄少女心
盖世英雄少女心 2021-01-04 01:04

I currently have a solution with multiple projects that mostly use the same classes. As a result, it appeared to me that it would be a good idea to add a class library cont

5条回答
  •  长情又很酷
    2021-01-04 01:33

    I think this is more along the lines of what you're trying to achieve.

    Put all of your common classes into a class library project and compile it to a DLL.

    You can then reference that DLL in external projects. Anytime you need to add a property to it for the external project you can then inherit the class and add the property there.

提交回复
热议问题