On Fri, 17 May 2002 07:34:34 -0700, Jim Arnold <[EMAIL PROTECTED]> wrote:
>[From the SDK docs] > >"A local variable named 'var' cannot be declared in this scope because it >would give a different meaning to 'var', which is already used in a 'parent >or current' scope to denote something else". Sorry, I should have been more explicit. I know this is the error you get from the Microsoft C# compiler. What I do not know and have not been able to find out is exactly which sentence from the language specification the Microsoft C# compiler writers are complying with when they issue this error message. I cannot argue with the error message itself. _if_ I "used" 'var' in the scope it _would_ indeed give a different meaning to 'var' which is indeed already in used in a parent scope. But what does "use" mean? It appears to mean "used in a declarator" but the nearest I can get to that in the spec is "used in an expression" which I'm not doing (unless I'm missing something) Cheers JJ You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.