Aracılığıyla paylaş


DataServiceCollection<T>.Clear Method (Boolean)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Removes all items from the collection, and optionally detaches all the items from the DataServiceContext.

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)

Syntax

'Declaration
Public Sub Clear ( _
    stopTracking As Boolean _
)
public void Clear(
    bool stopTracking
)

Parameters

Remarks

When an item is detached, all related objects in the data graph are also detached from the DataServiceContext.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.