To deep copy a IList in C# and VB.NET you can use the snippet.
Sample C#
public static IList<T> Clone<T>(IList<T> listToClone) where T : ICloneable { return listToClone.Select(item => (T)item.Clone()).ToList(); }
Sample VB.NET
Public Shared Function Clone(Of T As ICloneable)(listToClone As IList(Of T)) As IList(Of T) Return listToClone.[Select](Function(item) DirectCast(item.Clone(), T)).ToList() End Function
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
RT @CodeSnippetsNET: How to deep copy a IList in C# and #VB .NET http://t.co/VbJb7fiFZV #dotnet #csharp #visualstudio #programming #coding …
How to deep copy a IList in #CSharp and #VBNet via @CodeSnippetsNET http://t.co/6E7U3f6RfB #dotnet