DataServiceCollection<T>.Clear Method (Boolean)

 
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.

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)

public void Clear(
	bool stopTracking
)

Parameters

stopTracking
Type: System.Boolean

When true, detaches all items from the DataServiceContext.

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

.NET Framework
Available since 3.5
Silverlight
Available since 4.0
Return to top
Show: