TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maha
NA
600
70.9k
Namespace
Jan 6 2015 7:55 AM
This program is a modification of original program which is give in the following website
http://www.dotnetperls.com/namespace
I wish to know why modification is not working. Problem is highlighted.
using System;
using A.B.C;
namespace E
{
using
D;
class Program
{
static void Main()
{
// Can access CClass type directly from A.B.C.
CClass var1 = new CClass();
// Can access DClass type from D.
DClass var2 = new DClass();
// Must explicitely specify F namespace.
F.FClass var3 = new F.FClass();
// Display types.
Console.WriteLine(var1.ToString());//A.B.C.CClass
Console.WriteLine(var2.ToString());//D.DClass
Console.WriteLine(var3.ToString());//F.FClass
Console.ReadKey();
}
}
}
namespace A
{
namespace B
{
namespace C
{
namespace
D
{
public class CClass
{
}
}
}
}
}
namespace D
{
public class DClass
{
}
}
namespace F
{
public class FClass
{
}
}
/*
A.B.C.CClass
D.DClass
F.FClass
*/
Reply
Answers (
6
)
Data transfer (Window Service)
beginner