static void Main(string[] args)
{
int[] src = new int[3];
src[0] = 1;
src[1] = 2;
src[2] = 3;
int[] target = new int[3];
Array.Copy(src, target, 3);
foreach (int value in target)
{
Console.WriteLine(value);
Console.ReadKey();
}
}
Sanjeeb LenkaPosted Jul 5, 2013, 1:24 PM
i modified your code check this:
static void Main(string[] args)
{
int[] src = new int[3];
src[0] = 1;
src[1] = 2;
src[2] = 3;
int[] target = new int[3];
Array.Copy(src, target, 3);
foreach (int value in target)
{
Console.WriteLine(value);
}
Console.ReadKey();
}
in your code you wrote Console.ReadKey(); inside the foreach so after one value it wait for a specific input every time. so i modified.