Re: Me vs. MyClass
- From: "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@xxxxxxxxxxxxx>
- Date: Mon, 5 Sep 2005 21:52:26 -0500
David,
| Something else occurred to me: calling overridable functions from a
| ctor. Seems pretty obscure though, and again it's providing language
| support for a bad practice.
? puzzled look ?
C# & I believe both Java & C++ all support calling overridable methods in
constructors.
In fact System.Windows.Forms.Form.CreateParams is called from the
constructor! Which is why CreateParams cannot rely on fields initialized in
the constructor as the base constructor calls it before the derived
constructor has a chance for it to run.
I really don't see how MyClass adds or takes away support to calling
overridable methods in constructors...
Of course calling an overridable method in a constructor needs to be done
with caution.
Hope this helps
Jay
"david" <david@xxxxxxxxxxxxxxxx> wrote in message
news:slrndhpm51.hs5.david@xxxxxxxxxxxxxxxxxxxxxxxx
| On 2005-09-05, Jay B. Harlow [MVP - Outlook]
<Jay_Harlow_MVP@xxxxxxxxxxxxx> wrote:
| > David,
| > As I stated:
| >
| > It appears we may need to agree to disagree on MyClass & constructors...
:-|
|
| Agreed.
|
| > If I find additional info on a viable reason to call MyClass outside of
| > constructors I will post it.
|
| Something else occurred to me: calling overridable functions from a
| ctor. Seems pretty obscure though, and again it's providing language
| support for a bad practice.
|
<<snip>>
.
- Follow-Ups:
- Re: Me vs. MyClass
- From: david
- Re: Me vs. MyClass
- References:
- Me vs. MyClass
- From: Water Cooler v2
- Re: Me vs. MyClass
- From: Scott M.
- Re: Me vs. MyClass
- From: dfoster
- Re: Me vs. MyClass
- From: Sathyaish
- Re: Me vs. MyClass
- From: dfoster
- Re: Me vs. MyClass
- From: Jay B. Harlow [MVP - Outlook]
- Re: Me vs. MyClass
- From: dfoster
- Re: Me vs. MyClass
- From: Jay B. Harlow [MVP - Outlook]
- Re: Me vs. MyClass
- From: dfoster
- Re: Me vs. MyClass
- From: Jay B. Harlow [MVP - Outlook]
- Re: Me vs. MyClass
- From: david
- Re: Me vs. MyClass
- From: Jay B. Harlow [MVP - Outlook]
- Re: Me vs. MyClass
- From: david
- Me vs. MyClass
- Prev by Date: How to control the cursor symbol during a DragDrop
- Next by Date: RE: Software Protection / Licensing Systems for .NET
- Previous by thread: Re: Me vs. MyClass
- Next by thread: Re: Me vs. MyClass
- Index(es):
Relevant Pages
|