Data Binding Sources

Suitable sources for data binding include any object that exposes the IList interface. Most of the .NET collections implement this interface. Data objects provided by ADO.NET also expose Ilist, and you can also write your own objects that expose data through this interface.

The IList Interface

The Ilist interface has only a few methods. They are as follows:

  • Add adds an item to the list.

  • Clear removes all items from a list.

  • Contains searches a list for a certain value.

  • IndexOf determines the index of a particular value within the list.

  • Insert places a value into the list before a given index. This moves all following indexes up one and makes the list longer.

  • Remove takes an item out of the list.

  • RemoveAt removes one item from a ...

Get C# and the .NET Framework: The C++ Perspective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.