:-$

Ryan's work blog

My Links

News

The WeatherPixie
Subscribe with Bloglines
About this blog

Tools I use:

Post Categories

Article Categories

Archives

Image Galleries

Blog Stats

Personal

Projects

Random Blogs

Random other

Reference

Web comics

Work

the private keyword

Nathan was having some problems which made me reconsider what private should be used for. In the past, I've used it for everything unless I explicitly needed to access it from either the markup (the term we use for the HTML side of controls and pages, which ends up being a subclass of the code-behind) or another class somewhere. I'm thinking now it should not be the default access modifier, and should only be used when I explicitly want to hide something. This wouldn't really violate the concept of encapsulation, and would completely avoid Nathan's problem. So I'm moving my default to protected, and only using private if its something truly internal, like a cached object with a accessor or something.

posted on Wednesday, July 21, 2004 6:30 PM