Philippe Renaud
asked on
insert a keyvaluePair in middle of dictionnary ?
Hello EE,
I have a dictionnary of integer, string
lets say :
1 , Earth
2, Hi
3, Hello Mona Lisa
4, Moon
lets say I do :
for each kvp as KeyValuePair(Of Integer, String) in dict
if kvp.Value.Contains("Hello" ) then
---> here is my problem: insert new KVP AFTER index 3 and put : 4, Hello Peter
end if
next
so then 4,Moon would now be 5,Moon and so forth
is that possible ??
I have a dictionnary of integer, string
lets say :
1 , Earth
2, Hi
3, Hello Mona Lisa
4, Moon
lets say I do :
for each kvp as KeyValuePair(Of Integer, String) in dict
if kvp.Value.Contains("Hello"
---> here is my problem: insert new KVP AFTER index 3 and put : 4, Hello Peter
end if
next
so then 4,Moon would now be 5,Moon and so forth
is that possible ??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
list might be easier.
i was thinking that right afgter I press "submit your question" .. :P