Wednesday, October 28, 2009

Clone a generic list


Never thought it would be this easy..

List> insideSpans = replacingDic.Where(d => d.Key.Contains("
List> insideSpansClone = new List>(insideSpans.Count);


insideSpans.ForEach((cloneitem) =>
{
insideSpansClone.Add(new KeyValuePair(cloneitem.Key, cloneitem.Value));
});

3 comments:

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.