DEV Community

Zohar Peled
Zohar Peled

Posted on • Edited on

2

How do you organize your extension methods?

Do you have a class library for all extension methods?
Do you copy & paste extension methods from one project to another?
Do you have different class libraries for different extended objects (like stringExtensions.dll, IComparebleExtensions.dll etc')?

Personally, I find it best to have a different dll for each assembly - so for instance I'll have a StringsExtensions class and an IComparebleExtensions class in one dll called <companyName>.System.Extensions.dll.

What do you prefer? Why do you prefer that?

Top comments (1)

Collapse
 
babrown93 profile image
Bill

Where I'm at, we have a base project that is shared with other projects. That contains various things like interfaces and base classes. We just use a static class in that project for our extension methods under the project namespace. We only have a few extension methods to be fair.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more