Re: Class Instances
- From: "Christof Nordiek" <cn@xxxxxxxxx>
- Date: Mon, 11 Jun 2007 09:39:10 +0200
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> schrieb im Newsbeitrag
news:MPG.20d6fcc535c769261fe@xxxxxxxxxxxxxxxxxxxxxxx
Gino <someone@xxxxxxxxxxxxx> wrote:Actually a 'debuggable' builds (in most cases that build from
The first part of the statement, "newClass ras" creates a varible "ras"
of
type "newClass" on the stack.
It's value is set to null.
No - its value is unassigned, at least as far as the C# language is
concerned. An implementation could choose to clear the memory, but it
doesn't have to, as far as I'm aware. You won't be able to "see" the
contents of the memory until it's been definitely assigned anyway.
'DEBUG'-Configuration), its preset with null. But only, so that the debugger
has something to show, if it's stop before the assignment and the programm
has a specific behavior if the execution point is changed through the
debugger.
Conceptually local variables don't have initial values (if they aren't
initialized explicitly.)
Christof
.
- Follow-Ups:
- Re: Class Instances
- From: Jon Skeet [C# MVP]
- Re: Class Instances
- References:
- Class Instances
- From: James Matthews
- Re: Class Instances
- From: Gino
- Re: Class Instances
- From: Jon Skeet [C# MVP]
- Class Instances
- Prev by Date: Re: static class inheritance, generalized
- Next by Date: Re: Mapping a Decorator Pattern in NHibernate
- Previous by thread: Re: Class Instances
- Next by thread: Re: Class Instances
- Index(es):
Relevant Pages
|