NameScope.Remove Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the specific object from the collection.
Remove(KeyValuePair<String,Object>) |
Removes the specific object from the collection. |
Remove(String) |
Removes a mapping for a specified name from the collection. |
Removes the specific object from the collection.
public:
virtual bool Remove(System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^> item);
public bool Remove (System.Collections.Generic.KeyValuePair<string,object> item);
abstract member Remove : System.Collections.Generic.KeyValuePair<string, obj> -> bool
override this.Remove : System.Collections.Generic.KeyValuePair<string, obj> -> bool
Public Function Remove (item As KeyValuePair(Of String, Object)) As Boolean
Parameters
- item
- KeyValuePair<String,Object>
The object to remove from the collection, specified as a KeyValuePair<TKey,TValue> (key is String, value is Object).
Returns
true
if item was successfully removed from the collection, otherwise false
. Also returns false
if the item was not found in the collection.
Implements
Remarks
Because NameScope is a dictionary there is no concept of first occurrence; any given KeyValuePair<TKey,TValue> is guaranteed unique.
Applies to
.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν | Εκδόσεις |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Removes a mapping for a specified name from the collection.
public:
virtual bool Remove(System::String ^ key);
public bool Remove (string key);
abstract member Remove : string -> bool
override this.Remove : string -> bool
Public Function Remove (key As String) As Boolean
Parameters
- key
- String
The string key, which is the name of the XAML namescope mapping to remove.
Returns
true
if item was successfully removed from the collection, otherwise false
. Also returns false
if the item was not found in the collection.
Implements
Remarks
This method basically wraps UnregisterName, returning false
in cases that otherwise would have raised exceptions in UnregisterName.
Applies to
.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν | Εκδόσεις |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET σχόλια
.NET είναι ένα έργο ανοιχτού κώδικα. Επιλέξτε μια σύνδεση για να παρέχετε σχόλια: