Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Partial Classes

Status
Not open for further replies.

PinkFloyd43

Programmer
Oct 29, 2008
1
US
I have an object, associated with SalesForce, where as I have ened up created quite a few properties with get/set, etc, I would like to put these properties in a 'partial' class so the original class is not so cluttered with all the properties, I know I can expand, etc. But wanted to work with partial classes.

I want to take all the private properties and their associated public get/set from the main class and move them to the XXXXXpartial.vb class? I have played around with this for hours now and have about ready to give up!

Thanks!
PinkFloyd43 - Well of course from the dark side of de moon!
 
the problem isn't separating the public/private fields. the problem is encapsulation (or a lack there of).

usually when you have an enormous amount of properties this is a good time to look at what you want to expose, and how to expose it. This means creating members to encapsulate logic, and/or creating multiple objects to manage 1 concept.

for more information on the subject check out Domain Driven Design. there is alot of information on the web. and Evans book is considered a cornerstone for good development.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top