On Mon, 20 May 2002 04:06:09 -0700, Jim Arnold <[EMAIL PROTECTED]>
wrote:

>Jon,
>
>I don't think it's that the program itself breaks any rules, rather that
>the syntax clashes with C#'s name-resolution specs.

Hmmm. If it's not the program itself then what can it be!

> Within your method:
>
>void Method()
>{
>decl++;
>}
>
>'decl' is really 'this.decl', or 'T.decl' - it's only the ability of the
>compiler to resolve the full name that allows you to omit the identifier.

Yes. It's in scope. 10.7.

>The key, I think, is that the compiler *assumes* you will use the new
>variable you have just declared.  In which case, your reference to
>'this.decl' *without* the 'this' identifier would make any use of the new
>'decl' impossible.

I agree. I'll freely admit that it's not really important as well. I
happened to come across it while toying with the idea of writing a program
to test every sentence in the spec.
As it stands I think the problem is that the wording of the spec needs
tightening a smidgen.

Thanks
Jon Jagger

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to