Easy way to copy a Dictionary<string, object> ?

  • Thread starter Thread starter Joanna Carter \(TeamB\)
  • Start date Start date
J

Joanna Carter \(TeamB\)

I would like to copy the contents of a Dictionary<string, object> to another
Dictionary<string, object>. Do I have to iterate the source use something
like foreach or is there an easier way ?

Joanna
 
Joanna Carter (TeamB) said:
I would like to copy the contents of a Dictionary<string, object> to another
Dictionary<string, object>. Do I have to iterate the source use something
like foreach or is there an easier way ?

Have you tried the constructor overload which takes another dictionary
of the same type? I don't have the beta installed yet, but from the
docs it looks like it should work.
 
Have you tried the constructor overload which takes another dictionary
of the same type? I don't have the beta installed yet, but from the
docs it looks like it should work.

Excellent Jon, I'll try that tomorrow. It's amazing just how big a help file
can seem when you are looking for something :-))

Joanna
 
Back
Top