Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6112349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:44:08+00:00 2026-05-23T14:44:08+00:00

I’m playing around with namespaces and faced a problem I can’t really understand. My

  • 0

I’m playing around with namespaces and faced a problem I can’t really understand.

My namespace structure in a given class library is as follows:

Namespace History
Namespace History.Antiquity
Namespace History.Antiquity.East
Namespace History.Antiquity.West

When inside the source file that declares the namespace History, I can’t use any of the types defined under History.Antiquity.East or History.Antiquity.West without fully qualifying them, or without qualifying them starting with “Antiquity”.

Example Code:

The following for instance, gives me a compile-time error (assuming the type “Persia” is defined in History.Antiquity.East):

using History.Antiquity;

namespace History
{
    public class foo
    {
        public foo()
        {
            East.Persia.Conquer(); // error!
        }
    }

} 

I need to either fully qualify Persia, or qualify it starting from Antiquity. Alternatively, I can introduce an alias:

using East = History.Antiquity.East;

Actual question:

What I can’t seem to understand is why is there a problem with this namespace structure. How can it be that .Net finds it conflicting?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:44:09+00:00Added an answer on May 23, 2026 at 2:44 pm

    You have to open a namespace in order to see it’s types in C#. Types from sub-namesapces are not automatically visible. So, put the following on top of your code file:

    using History.Antiquity.East;
    

    Then you can directly access your type as follows:

    Persia.Conquer();
    

    By the way, your code samples look like a mixture of VB, C# and C++/CLI… what language are you actually using?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.