Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

assign a list to another in c# without a loop

List<Int32> copy = new List<Int32>(original);
or if you're using C# 3 and .NET 3.5, with Linq, you can do this:
List<Int32> copy = original.ToList();
 
PREVIOUS NEXT
Tagged: #assign #list #loop
ADD COMMENT
Topic
Name
3+1 =