PersonalizationDictionary.Remove Method

Note: This method is new in the .NET Framework version 2.0.

Removes a custom state entry based on the provided key.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

public:
virtual void Remove (
	String^ key
)
public void Remove (
	String key
)
public function Remove (
	key : String
)

Parameters

key

The key of the entry to be removed.

Exception typeCondition

ArgumentNullException

key is a null reference (Nothing in Visual Basic).

ArgumentException

key is either an empty string (""), or trimming key results in an empty string.

Internally, when you remove a custom state entry, the count of the personalization dictionary is decremented by one. Any enumerators currently active against the dictionary should be invalidated.

No error occurs if you attempt to remove a nonexistent key.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: