Re: Override static derived variable
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Sun, 19 Jun 2005 17:34:10 +0100
Joanna Carter (TeamB) <joannac@xxxxxxxxxxxxxxx> wrote:
> I am not instantiating them for this example, I am just using static calls
> as demonstrated by the OP.
>
> Console.WriteLine(Thing.GetVar());
> Console.WriteLine(Derived.GetVar());
Those both compile to the same thing - there will be nothing which
actually references Derived.GetVar in the IL, as there is really no
such method. Therefore there is (as far as the CLR is concerned) no
need to initialise the Derived class.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: Override static derived variable
- From: Chad Z. Hower aka Kudzu
- Re: Override static derived variable
- References:
- Override static derived variable
- From: knocte
- Re: Override static derived variable
- From: Joanna Carter \(TeamB\)
- Re: Override static derived variable
- From: Chad Z. Hower aka Kudzu
- Re: Override static derived variable
- From: Joanna Carter \(TeamB\)
- Override static derived variable
- Prev by Date: Re: Override static derived variable
- Next by Date: Re: How to transfer a string to char array
- Previous by thread: Re: Override static derived variable
- Next by thread: Re: Override static derived variable
- Index(es):
Relevant Pages
|
Loading