M
Matt Mastracci
It seems like the C# compile can't resolve the difference between a
namespace and a class in a situation that is clearly unambiguous. Note
that it sees the namespace "C" before the class "C". I believe it
should see the class "C" first.
test1.cs:
=============
using System;
using A.C;
namespace A.B
{
public class D
{
D() { C c = new C(); }
}
}
test2.cs:
=============
using System;
namespace A.C
{
public class C
{
int X;
}
}
=============
C:\>csc /target:library test1.cs test2.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.
test1.cs(8,9): error CS0118: 'A.C' denotes a 'namespace' where a 'class' was
expected
namespace and a class in a situation that is clearly unambiguous. Note
that it sees the namespace "C" before the class "C". I believe it
should see the class "C" first.
test1.cs:
=============
using System;
using A.C;
namespace A.B
{
public class D
{
D() { C c = new C(); }
}
}
test2.cs:
=============
using System;
namespace A.C
{
public class C
{
int X;
}
}
=============
C:\>csc /target:library test1.cs test2.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.
test1.cs(8,9): error CS0118: 'A.C' denotes a 'namespace' where a 'class' was
expected