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 7536961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:43:06+00:00 2026-05-30T06:43:06+00:00

I have a problem regarding the name resolution of a type called Action. While

  • 0

I have a problem regarding the name resolution of a type called Action. While the project was in an early state and everything was declared in the same project the compiler always preferred my own class. However since it has become necessary to separate the project into different assemblies (i.e. ProjectName.Common, ProjectName.Engine, etc.) a naming conflict between System.Action and ProjectName.Common.Action arised.

I found out that I can explicitly import the project internal namespace inside of the namespace declaration of any project file, while System is still imported in the global scope as initially created by the IDE. In fact this works but does not look very elegant. Is there a better approach to solve this problem? Renaming my Action class is not really an acceptable solution, since it is quite a common domain-name and not anything special like i.e. Math etc.

Code Example:

using System;
...

namespace ProjectName.Engine {

    using ProjectName.Common;

    class SomeClass {

        private Action action;
        ...

    }

}

Maybe someone knows a recipe for those kind of naming conflicts …

  • 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-30T06:43:07+00:00Added an answer on May 30, 2026 at 6:43 am

    Consider placing your Action class in the root ProjectName namespace instead of ProjectName.Common. If you do that, then inside the ProjectName namespace or any subnamespace, Action will refer to ProjectName.Action instead of System.Action, and you won’t have to add using directives to all your other source files.

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

Sidebar

Related Questions

I actually have two questions regarding the same problem but I think it is
I'm doing a simple program regarding methods. But I have one problem. Everything is
I have a problem regarding getting the path of a user control. The scenario
I have a problem regarding StartUp Url in WPF. I have a LoginView.xaml and
I have a problem regarding the datediff MYSQL function, I can use it and
I have a question regarding a problem with L2S, Autogenerated DataContext and the use
I have a problem regarding to a JavaScript function. I used to have a
I have a problem regarding to MPMoviePlayer. I am using [self presentModalViewController:moviePlayer animated:YES]; to
I have a strange problem regarding Flash error 1151: A conflict exists with definition
I am having the same problem as this thread regarding twilio-python : twilio.rest missing

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.