IDictionary.Clear Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Removes all elements from the IDictionary object.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)

Syntax

Sub Clear
void Clear()

Exceptions

Exception Condition
NotSupportedException

The IDictionary object is read-only.

Examples

The following code example demonstrates how to implement the Clear method. This code example is part of a larger example provided for the IDictionary class.

Public Sub Clear() Implements IDictionary.Clear
   ItemsInUse = 0
End Sub
public void Clear() { ItemsInUse = 0; }

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

IDictionary Interface

System.Collections Namespace