469,578 Members | 1,897 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

Nested classes

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
3 2507
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
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
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.

Similar topics

3 posts views Thread by Erik Bongers | last post: by
3 posts views Thread by Rubťn Campos | last post: by
6 posts views Thread by B0nj | last post: by
8 posts views Thread by Robert W. | last post: by
2 posts views Thread by Bob Day | last post: by
2 posts views Thread by miked | last post: by
5 posts views Thread by Jake K | last post: by
3 posts views Thread by Cousson, Benoit | last post: by
reply views Thread by Maric Michaud | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.