[Mono-list] Important difference with Microsoft compiler

Artur Brodowski bzd@astercity.net
Fri, 14 Mar 2003 12:41:55 +0100


On Fri, 14 Mar 2003 12:26:01 +0100
Gustavo Garc=EDa Bernardo <ggb@tid.es> wrote:
> using System;
> namespace ConsoleApplication1
> {
> class Class1
> {
> static void Main(string[] args)
> {
>   for (int i=3D0;i<10;i++)
>   {
>     A a =3D new A();
>   }
>   A a =3D new A();
> }
> }
> class A
> {
> }
> }

and this is what i get (mono/mcs 0.23):

test.cs(13) error CS0136: A local variable named `a' cannot be declared in =
this
scope since it would give a different meaning to `a', which is already used=
 in
a `child' scope to denote something else
Compilation failed: 1 error(s), 0 warnings

regards,
artb.
--=20
only so many songs can be sung with two lips two lungs and one tongue