KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was reading some posts and noticed samples with an inner class. I've been seeing it a lot lately, particularly in a few examples on MSDN that I was browsing through. I've never had to use an inner class before (but maybe I really should be) so I wonder what exactly is the point? I assume that an inner class (at least a private one anyways) is only available to the main class itself, so wouldn't it be the same to simply incorporate whatever functionality the inner class has into some methods of the outer class? Is there an OO reason behind the inner class? I'm thinking mainly within C#, but I suppose that this could apply to any OO language that supports an inner class. Take this sample on msdn for example: CharacterCollection and WordCollection are public classes within the Document class. What difference would there be if these were outside of the Document class?
Tags (comma-separated)
Save Edits
Cancel