A
agro_r
Examine this code...
using System;
class Foo
{
public int i = 0;
}
namespace Joe
{
class Foo
{
public int i = 10;
}
class Start
{
static void Main()
{
Foo bar = new Foo();
Console.WriteLine(bar.i); // will print 10
}
}
}
My question is, how can Main() access the Foo class which resides in
the "root" namespace, other than using this statement:
[code:1:adc9efdc6b]
using OuterFoo = Foo;
[/code:1:adc9efdc6b]
In C++ we can use ::Foo but I haven't found such mechanism in C#.
Thanks a lot...
using System;
class Foo
{
public int i = 0;
}
namespace Joe
{
class Foo
{
public int i = 10;
}
class Start
{
static void Main()
{
Foo bar = new Foo();
Console.WriteLine(bar.i); // will print 10
}
}
}
My question is, how can Main() access the Foo class which resides in
the "root" namespace, other than using this statement:
[code:1:adc9efdc6b]
using OuterFoo = Foo;
[/code:1:adc9efdc6b]
In C++ we can use ::Foo but I haven't found such mechanism in C#.
Thanks a lot...