This documentation is archived and is not being maintained.
DataBindingCollection.Clear Method
.NET Framework 1.1
Removes all DataBinding objects from the DataBindingCollection.
[Visual Basic] Public Sub Clear() [C#] public void Clear(); [C++] public: void Clear(); [JScript] public function Clear();
Example
[Visual Basic, C#, C++] The following code example removes all of the DataBinding objects from the DataBindingCollection with the Clear method, then string concatenates the value of the Count property and writes it to a file.
[Visual Basic] myDataBindingCollection1.Clear() dataBindingOutput8 = [String].Concat("The Count of the collection after clear method is called ", myDataBindingCollection1.Count) WriteToFile(dataBindingOutput8) [C#] myDataBindingCollection1.Clear(); dataBindingOutput8=String.Concat("The Count of the collection after clear method is called ",myDataBindingCollection1.Count); WriteToFile(dataBindingOutput8); [C++] myDataBindingCollection1->Clear(); dataBindingOutput8=String::Concat(S"The Count of the collection after clear method is called ", __box(myDataBindingCollection1->Count)); WriteToFile(dataBindingOutput8);
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
DataBindingCollection Class | DataBindingCollection Members | System.Web.UI Namespace
Show: