Re: try...catch and local variables

Tech-Archive recommends: Fix windows errors by optimizing your registry



I am not sure if memory for local variable
declarations is primed with zeros. Is it
somewhere in the language specifications?

ECMA-334, §12 "A variable shall be definitely assigned (§12.3) before its
value can be obtained."

So within the language, it is irrelevant (an implementation detail) whether
the variable is zero'd - as you cannot legally look to see. The CLR may
behave differently, but since this is a C# NG...

Marc


.



Relevant Pages

  • Re: try...catch and local variables
    ... "Sericinus hunter" wrote in message ... declarations is primed with zeros. ... somewhere in the language specifications? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: try...catch and local variables
    ... Marc Gravell wrote: ... declarations is primed with zeros. ... somewhere in the language specifications? ...
    (microsoft.public.dotnet.languages.csharp)