c# - BindingList and column flexibility -


Everyone knows about the binding list instead of DataTable

You people have the problem of column flexibility How to remove it? I need to define and implement T objects for the binding list. If a new column is required to be added, then I have to add new properties for T objects .... while in datatale it is very easy.

  Binding List  T & gt; Samples = new binding list & lt; T & gt; ();  

Is there something that you live with or what is a relatively easy way to overcome it?

Using C # 2.0, Compact Structure

There are still (sometimes) advantages to using DataTable - and column flexibility is one of them.

It is being said that there are also inconsistencies with it.

A small comparison of the advantages and disadvantages for each.

My personal rule of thumb Baiding list Pairing in the collection of business objects In this case, the problem of the column is solved (you know that columns are already useful), and it seems more natural than

Datagram still useful If you are bound for something unknown, and are trying to parsing at the runtime.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -