ArcFM Responder Mobile Developer Guide
AddOrAppend<TK,TV> Method






If the key doesn't exist then add new item. If key already exists then append item
Syntax
'Declaration
 
<System.Runtime.CompilerServices.ExtensionAttribute()>
Public Shared Sub AddOrAppend
    (Of TK,TV)( _
   ByVal dictionary As System.Collections.Generic.Dictionary(Of TK,List(Of TV)), _
   ByVal key As TK, _
   ByVal value As System.Collections.Generic.List(Of TV) _
) 
'Usage
 
Dim dictionary As System.Collections.Generic.Dictionary(Of TK,List(Of TV))
Dim key As TK
Dim value As System.Collections.Generic.List(Of TV)
 
EnumerableExtensions.AddOrAppend(Of TK, TV)(dictionary, key, value)
[System.Runtime.CompilerServices.Extension()]
public static void AddOrAppend<TK,TV>( 
   System.Collections.Generic.Dictionary<TK,List<TV>> dictionary,
   TK key,
   System.Collections.Generic.List<TV> value
)
public procedure AddOrAppend( 
    dictionary: System.Collections.Generic.Dictionary;
    key: TK;
    value: System.Collections.Generic.List
); static; 
System.Runtime.CompilerServices.ExtensionAttribute()
public static function AddOrAppend( 
   dictionary : System.Collections.Generic.Dictionary,
   key : TK,
   value : System.Collections.Generic.List
);
[System.Runtime.CompilerServices.Extension()]
public: static void AddOrAppend<TK,TV>( 
   System.Collections.Generic.Dictionary<TK*,List<TV*>*>* dictionary,
   TK* key,
   System.Collections.Generic.List<TV*>* value
) 
[System.Runtime.CompilerServices.Extension()]
public:
static void AddOrAppendgeneric<typename TK>
generic<typename TV>
( 
   System.Collections.Generic.Dictionary<TK^,List<TV^>^>^ dictionary,
   TK^ key,
   System.Collections.Generic.List<TV^>^ value
) 

Parameters

dictionary
key
value

Type Parameters

TK
TV
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EnumerableExtensions Class
EnumerableExtensions Members

Send Feedback