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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:34:46+00:00 2026-05-11T02:34:46+00:00

In a framework, should class dependencies run down a namespace (root to leaf) or

  • 0

In a framework, should class dependencies run down a namespace (root to leaf) or up a namespace (think of it as an inverted tree with the root at the top)?

I’m having a hard time describing this, so let’s look at an example:

namespace foo {   class snafu : fubar {} }  namespace foo.bar {   class tarfu : snafu {}    class fubar {} } 

In this case, class tarfu has a base class dependency on snafu. The dependency walks up the namespace tree. Class snafu has a base class dependency on fubar. The dependency walks down the namespace tree.

Should dependencies only walk up the namespace tree? Or should it be the reverse? Why should it matter?

I’m developing in .NET, but if its different for other platforms I’d be interested in learning about those as well.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T02:34:47+00:00Added an answer on May 11, 2026 at 2:34 am

    Since you are using .NET I would strongly recommend that you match the convention of the .NET framework. This will keep your code consistent with the framework.

    So this means that you ought to do this:

    namespace First {     class Parent { } }  namespace First.Second {     class Child : First.Parent { } } 

    And just to clarify, it doesn’t really matter what you do as the C# compiler simply appends all namespaces to the type name to create a longer type that is more likely to be unique. That is why I think it is best to avoid confusion and stick with convention.

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

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Remember, in ASP.Net every time you cause a postback of… May 11, 2026 at 11:35 pm
  • Editorial Team
    Editorial Team added an answer Looks like NSURLResponse object contains a MIMEType property. That should… May 11, 2026 at 11:35 pm
  • Editorial Team
    Editorial Team added an answer The following gets you a distinct list of cities and… May 11, 2026 at 11:35 pm

Related Questions

I'm playing around at the start of a personal project in C# and MySQL.
I've been reading about dependency injection and have a simple question. I can understand
I am just getting started using any DI/IoC toolset and have a very basic
I have an existing VS 2005 Std .NET Compact Framework application that I want

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.