No need to create a new array, just Concat the two arrays and then use Write
instead of WriteLine
:
foreach(var res in arr1.Concat(arr2)
{
Console.Write($"{res} ");
}
1
solved console.writeline values of array on one line [closed]
No need to create a new array, just Concat the two arrays and then use Write
instead of WriteLine
:
foreach(var res in arr1.Concat(arr2)
{
Console.Write($"{res} ");
}
1
solved console.writeline values of array on one line [closed]