Re: Inheritance of constructors.
- From: A n g l e r <p|k|o|n|i|u|s|z@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jun 2008 14:48:54 +0100
Consider an example where a new class (for instance it's constructor) is in charge of the data preparation which is fed to a parent class constructor. OK, you can pass it via static variable as suggested, though what happens if you want to have different data in it for each instance of a new class? Unless static in C# means it exists over the whole cycle of a code execution but doesn't limit it to one global data copy shared amongst all instances like in C++. Is this the case?
Erm, OK, I see what happens in this case. It's passed via static method, the value reference is stored locally in a base class. No harm done unless I would prefer it would be capable of following every change of the value reference in outer classes ... what then?
.
- Follow-Ups:
- Re: Inheritance of constructors.
- From: Jon Skeet [C# MVP]
- Re: Inheritance of constructors.
- References:
- Inheritance of constructors.
- From: A n g l e r
- Re: Inheritance of constructors.
- From: Jon Skeet [C# MVP]
- Re: Inheritance of constructors.
- From: A n g l e r
- Re: Inheritance of constructors.
- From: Jon Skeet [C# MVP]
- Re: Inheritance of constructors.
- From: A n g l e r
- Inheritance of constructors.
- Prev by Date: Re: Inheritance of constructors.
- Next by Date: Re: List in this CollectionBase
- Previous by thread: Re: Inheritance of constructors.
- Next by thread: Re: Inheritance of constructors.
- Index(es):
Relevant Pages
|