Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I do apoligize in advance for that's a probably silly question but... I'm developing a custom Sharepoint Webpart and, for the sake os SOLID principle, I need to embed certain functionalities in separate class files. Except from creating a class library is it possible to embed a class into the webpart project and use it into webpart's class?

share|improve this question
add comment

1 Answer 1

No, in SharePoint development you should repeat blocks of code in each monolithic web part class.

ONLY KIDDING!

Yes, it is a good practice to have shared generic classes for your web parts, feature receivers, etc. Another good idea is to have your own base web part class to derive from.

share|improve this answer
    
I'm not able to cast an up vote for you but thank you very much! :) –  mamoo Jan 27 '11 at 9:45
1  
Give a tick. Only the questioner can do this. –  Neil Richards Jan 27 '11 at 9:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.