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

  • Home
  • SEARCH
  • 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 6815799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:51:00+00:00 2026-05-26T20:51:00+00:00

I have a class EventArgs(Of T) in my solution. This class is located in

  • 0

I have a class EventArgs(Of T) in my solution.
This class is located in the namespace Acme.Infrastructure.Interface.
A class with the same name EventArgs exists in the System namespace.

In another project in my solution I have a class Acme.BusinessModules.MyModule.MyClass
When attempting to use the EventArgs class I have to fully qualify the class name or the compiler thinks I am using the System.EventArgs class.

My understanding of namespace resolution was that the compiler would first look for the class in the current namespace, and then its parents. It seems that the compiler checks in System before it checks in sibling namespaces.

Is it correct that System is checked before the sibling? Or is this behaviour caused by other issues (Imports order?)?

  • 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-26T20:51:00+00:00Added an answer on May 26, 2026 at 8:51 pm

    Look at the namespaces involved:

    • Acme.BusinessModules.MyModule
    • Acme.Infrastructure.Interface

    There’s no reason why the compiler would look in Acme.Infrastructure.Interface when compiling a class in Acme.BusinessModules.MyModule. Now if the code you were writing were in (say) Acme.Infrastructure.Interface.SomethingElse then that would be a different matter – but here it looks like the compiler is doing absolutely the right thing. The fact that both namespaces start with Acme is neither here nor there.

    As you yourself said:

    My understanding of namespace resolution was that the compiler would first look for the class in the current namespace, and then its parents.

    The ancestor namespaces here are Acme.BusinessModules and Acme – not Acme.Infrastructure.Interface.

    I would also strongly advise you not to create class names which conflict with those in System. It’s really just asking for trouble.

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

Sidebar

Related Questions

I have class Cab(models.Model): name = models.CharField( max_length=20 ) descr = models.CharField( max_length=2000 )
I've implemented a class that looks like this interface: [ImmutableObject(true)] public interface ICustomEvent {
I have a VB Solution with a dozen forms trying to implement invoice system.
I have been looking for a solution to this problem for ages. I have
I have 2 projects in my solution. MVC Web application Class library The MVC
I have class method that returns a list of employees that I can iterate
I have: class MyClass extends MyClass2 implements Serializable { //... } In MyClass2 is
I have class A: public class ClassA<T> Class B derives from A: public class
I have class with internal property: internal virtual StateEnum EnrolmentState { get { ..getter
I have class with a member function that takes a default argument. struct Class

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.