By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 1,994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

Nested classes

P: n/a
This might sound a silly question, but is it possible to nest a class without
actually including the implementation of that class within the parent class?
If possible, I'd prefer to have the nested class implemented in it's own .cs
file as this makes it easier to navigate my code and reduces the amount of
identation.

Can it be done?
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Can it be done?


In v2 it can sort of be done thanks to partial classes. Not in
previous versions.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #2

P: n/a
Barguast <It*****************@Email.com> wrote:
This might sound a silly question, but is it possible to nest a class without
actually including the implementation of that class within the parent class?
If possible, I'd prefer to have the nested class implemented in it's own .cs
file as this makes it easier to navigate my code and reduces the amount of
identation.

Can it be done?


No, I don't believe so.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #3

P: n/a
I had a brief read up of partial classes
(http://www.devx.com/dotnet/Article/22603) and it does seem to be what I'm
after. It's just a shame I can't use them yet :(

"Mattias Sjögren" wrote:
Can it be done?


In v2 it can sort of be done thanks to partial classes. Not in
previous versions.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.