C# Shallow Clone of List of T

 

C# Shallow Clone


For a shallow clone of a List<T> and not just a pointer to the originalList, do this:

var shallowClone = new List(originalList);

Comments

Popular posts from this blog

GHL Email Campaigns

JSON Web Tokens

Extras for New .NET Projects