METHOD

Array.Copy

Copies elements into an existing destination array. For reference-type elements, copying references is not a deep copy of objects.

Formal Syntax & Structure

csharp syntaxcsharp
Array.Copy(source, destination, length)

Working Example

Example Snippetcsharp
using System;int[] source = { 3, 5 };int[] destination = new int[2];Array.Copy(source, destination, source.Length);Console.WriteLine(string.Join(",", destination)); // 3,5
C# & .NET Reference