Patrick87
Patrick87

Reputation: 249

How to structure C# class library?

How do you write and structure your code in a class library such that when it is built as DLL other programmers can use that DLL as their library more like the base class library? Except that I don't know how to structure them; are there any rules in writing a good library? Best practices maybe? So that my library will be elegant and much like the base class libraries in .NET.

Please help.

Upvotes: 9

Views: 14565

Answers (2)

Jan Dobkowski
Jan Dobkowski

Reputation: 661

This should help: Design Guidelines for Developing Class Libraries. Actually a good reading for all .NET developers.

Upvotes: 15

Plymouth223
Plymouth223

Reputation: 1925

Use static code analysis (FxCop). It'll enforce all of Microsoft's guidelines/best practices for library development.

Upvotes: 1

Related Questions