ModelItemExtensions.SwitchKeys Method (ModelItemDictionary, Object, Object, ModelItem%)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Replaces the specified old key with the specified new key in the specified dictionary, and if applicable returns the item of the new key.

Namespace:  System.Activities.Design.ModelTree
Assembly:  System.Activities.Design (in System.Activities.Design.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function SwitchKeys ( _
    dictionary As ModelItemDictionary, _
    oldKey As Object, _
    newKey As Object, _
    <OutAttribute> ByRef newKeyItem As ModelItem _
) As Boolean
'Usage
Dim dictionary As ModelItemDictionary
Dim oldKey As Object
Dim newKey As Object
Dim newKeyItem As ModelItem
Dim returnValue As Boolean

returnValue = dictionary.SwitchKeys(oldKey, _
    newKey, newKeyItem)
public static bool SwitchKeys(
    this ModelItemDictionary dictionary,
    Object oldKey,
    Object newKey,
    out ModelItem newKeyItem
)
[ExtensionAttribute]
public:
static bool SwitchKeys(
    ModelItemDictionary^ dictionary, 
    Object^ oldKey, 
    Object^ newKey, 
    [OutAttribute] ModelItem^% newKeyItem
)
public static function SwitchKeys(
    dictionary : ModelItemDictionary, 
    oldKey : Object, 
    newKey : Object, 
    newKeyItem : ModelItem
) : boolean
static member SwitchKeys : 
        dictionary:ModelItemDictionary * 
        oldKey:Object * 
        newKey:Object * 
        newKeyItem:ModelItem -> bool 

Parameters

  • oldKey
    Type: System.Object
    The key to replace. This parameter cannot be nulla null reference (Nothing in Visual Basic).
  • newKey
    Type: System.Object
    The new key. This parameter cannot be nulla null reference (Nothing in Visual Basic).

Return Value

Type: System.Boolean
true if the attempt was successful; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ModelItemDictionary. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

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

Version Information

.NET Framework

Supported in: 4

See Also

Reference

ModelItemExtensions Class

ModelItemExtensions Members

SwitchKeys Overload

System.Activities.Design.ModelTree Namespace