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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:27:11+00:00 2026-05-31T14:27:11+00:00

If I define an interface ITestInterface and then immediately create a class that implements

  • 0

If I define an interface ITestInterface and then immediately create a class that implements that interface for usage within an application is it ok to keep the class and interface in the same namespace or should they be seperate. i.e. Test.Interfaces and Test.Interfaces.Implementation.

Both my interface and its implementation will be in its own assembly so I’m not looking to create another one just to contain the interface itself.

This is particular related to c# however I guess it can cover any language.

  • 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-31T14:27:12+00:00Added an answer on May 31, 2026 at 2:27 pm

    It’s probably better to use the established conventions of the .NET predefined classes. For example, looking in the System.Collections.Generic namespace we can see that both IDictionary and Dictionary are there. So probably putting them in the same namespace is the best idea.

    Also, since both the interface and the implementation most likely serve the same purpose, it’s better to group them in the same namespace.

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

Sidebar

Related Questions

I am about to define an interface in my application that plug-in writers can
I've noticed that a lot of developers define an interface for EVERY class that
If I define an interface in PHP, and a factory class that creates an
#define interface class (here is more - http://www.codeproject.com/KB/cpp/CppInterfaces.aspx ) Does that make sense? Does
If an interface inherits IEquatable the implementing class can define the behavior of the
Eclipse allows us to define a class as: interface MyInterface { void methodA(); int
I am trying to define a WCF contract that returns an interface, something like
I have a very thin interface that's going to define one method. Should I
In Visual Studio if I define a class to implement an interface e.g. class
I have a functional AdjacencyListGraph class that adheres to a defined interface GraphStructure. In

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.