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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:23:13+00:00 2026-05-12T05:23:13+00:00

When reading this question I started to wonder a bit. Say you have these

  • 0

When reading this question I started to wonder a bit. Say you have these two:

class ProductCollection : ICollection<Product>
class ProductList : IList<Product>

What would you call one that were an IEnumerable<Product>?

class Product--- : IEnumerable<Product>

Before I read that other question I might have called it a ProductCollection actually, but taking the new info into account, that would have been a bit misleading since it does not implement ICollection<Product>. Could you call it Products?

var products = new Products(); // products is/are products

Almost works but sounds a bit strange… What would you call it?

  • 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-12T05:23:13+00:00Added an answer on May 12, 2026 at 5:23 am

    You generally do not base the name of a class off any interface it implements. (Which one do you choose when there are multiple ones, for a start?) It is quite typical to base it off an inherited class, but more often simply on the purpose of the class, and certainly not the interface. (The interface might be named after the class, if anything.)

    Your example is somewhat invalidated by the fact that a well-designed ProductCollection should implement ICollection<Product> and IEnumerable<Product> while a well-designed ProductList should implement both those interfaces as well as IList<Product>.

    If you look in the BCL of the .NET Framework, you should notice that this is precisely the case. The List<T> class implements all three interfaces, as does the Collection<T> class (though note that in the general case a ‘collection’ need not implement IList<T>).

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

Sidebar

Related Questions

After reading this question I started to wonder: is it possible to have a
This is a continuation of my question about reading the superblock . Let's say
I started with this question: Multiple Javascript gadgets per page . After reading up
When researching for this question and reading the sourcecode in random.py , I started
I have started reading the Lions Commentary on Unix v6. I came across these
Reading this question I found this as (note the quotation marks) code to solve
After reading this question , I was reminded of when I was taught Java
I was reading this question about how to parse URLs out of web pages
Reading through this question on multi-threaded javascript, I was wondering if there would be
After reading this on the question How do I uniquely identify computers visiting my

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.