BindingSource.Count Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the total number of items in the underlying list, taking the current Filter value into consideration.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<BrowsableAttribute(false)>]
abstract Count : int with get
[<BrowsableAttribute(false)>]
override Count : int with get

Property Value

Type: System.Int32

The total number of filtered items in the underlying list.

The Count property gets the number of items in the underlying list represented by the List property as modified by the value of the Filter property.

The following code example demonstrates the List, RemoveAt, and Count members. To run this example, paste the code into a form that contains a BindingSource named BindingSource1, two labels named label1 and label2, and a button named button1. Associate the button1_Click method with the Click event for button1. Visual Basic users will need to add a reference to System.Data.dll.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: