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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:04:38+00:00 2026-05-11T08:04:38+00:00

I have a class Customer (with typical customer properties) and I need to pass

  • 0

I have a class Customer (with typical customer properties) and I need to pass around, and databind, a ‘chunk’ of Customer instances. Currently I’m using an array of Customer, but I’ve also used Collection of T (and List of T before I knew about Collection of T). I’d like the thinnest way to pass this chunk around using C# and .NET 3.5.

Currently, the array of Customer is working just fine for me. It data binds well and seems to be as lightweight as it gets. I don’t need the stuff List of T offers and Collection of T still seems like overkill. The array does require that I know ahead of time how many Customers I’m adding to the chunk, but I always know that in advance (given rows in a page, for example).

Am I missing something fundamental or is the array of Customer OK? Is there a tradeoff I’m missing?

Also, I’m assuming that Collection of T makes the old loosely-typed ArrayList obsolete. Am I right there?

  • 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. 2026-05-11T08:04:38+00:00Added an answer on May 11, 2026 at 8:04 am

    No one has mentioned the Framework Guidelines advice: Don’t use List<T> in public API’s:

    We don’t recommend using List in public APIs for two reasons.

    • List<T> is not designed to be extended. i.e. you cannot override any members. This for example means that an object returning List<T> from a property won’t be able to get notified when the collection is modified. Collection<T> lets you overrides SetItem protected member to get “notified” when a new items is added or an existing item is changed.

    • List has lots of members that are not relevant in many scenarios. We say that List<T> is too “busy” for public object models. Imagine ListView.Items property returning List<T> with all its richness. Now, look at the actual ListView.Items return type; it’s way simpler and similar to Collection<T> or ReadOnlyCollection<T>

    Also, if your goal is two-way Databinding, have a look at BindingList<T> (with the caveat that it is not sortable ‘out of the box’!)

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

Sidebar

Related Questions

Well, I have a class Customer (no base class). I need to cast from
I have class(Customer) which holds more than 200 string variables as property. I'm using
If I have a Customer class that just has simple properties (e.g. Name ,
Say I have a class Customer which has a property FirstName . Then I
Suppose I have a class Customer that is mapped to the database and everything
I am following the guide at http://guides.rubyonrails.org/association_basics.html and I have created class Customer <
I have a Customer class defined like this: @Entity public class Customer { //...
I have two models: class Customer(models.Model): (...) class CustomerMemo(models.Model): (...) customer = models.ForeignKey(Customer) text
I have a class Contact (base class),a class called Customer and a class called
what i mean by that is: i have a class called Customer: public 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.