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

Upgrading to .NET8 from desktop versions 4.8.X

JSON Web Tokens

GHL > Set website so shorter URL address