Well, I'm definitely learning more than just one 'something new' every day
;-)
Thanks again!
Jeff
"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.1b4285376edc943c98ad58@msnews.microsoft.c om...[color=blue]
> z_learning_tester <someone@microsoft.com> wrote:[color=green]
> > Thanks for the response.
> > Your example explained my question perfectly :-)
> >
> > But your example begs another question-
> > You say "private class MyPrivateClass" then use a public constructor[/color][/color]
"public[color=blue][color=green]
> > MyPrivateClass()"
> > Is that right?
> > Sorry I still get confused on the basics sometimes. I think constructors[/color][/color]
are[color=blue][color=green]
> > always public even if their class is private, though it seems like a
> > contradiction...[/color]
>
> No, constructors aren't always public. You can have private
> constructors which would only be able to be called within the class. If
> a private class has a public (or internal) constructor, then the
> enclosing class will be able to call it.
>[color=green]
> > Oops, then another question- you are calling the method "TestMethod()"[/color][/color]
from[color=blue][color=green]
> > inside the constructor.
> > Can you do that?[/color]
>
> You certainly can. It's generally a bad idea to call *virtual* methods
> inside constructors though.
>
> --
> Jon Skeet - <skeet@pobox.com>
>
http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too[/color]