Decorator Pattern on List<T> for DataGridView
Posted
by
elector
on Stack Overflow
See other posts from Stack Overflow
or by elector
Published on 2011-02-25T07:22:19Z
Indexed on
2011/02/25
7:24 UTC
Read the original article
Hit count: 269
Hi all,
I would like to apply a Decorator on List class and be able to bind it to the WinForms DataGirdView. I would like to know what members of List i need to implement for this new class to be able to bind it to DataGrid. Some of the methods from List I would hide with my decorated class methods and others I would just call _decoratedList.Method(). Is this an option for implementing Decorator on List type?
Decorator:
public class MyCustomList : List<MyObject>
{
List<MyObject> _decoratedList;
.
.
.
}
© Stack Overflow or respective owner