Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Merging and sorting 2 arrays using LINQ
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine("Hello, world!"); int[] arr1= {0,2,4,6,8,10}; int[] arr2= {1,3,5,7,9}; IEnumerable<int> result= new int[arr1.Length + arr2.Length]; result=(arr1.Union(arr2)).OrderBy(x=>x); foreach(var res in result) { Console.WriteLine(res +" "); } } } }
run
|
edit
|
history
|
help
0
asxasxsd
C# Extension Method
Plt-D v.0.8.5
C++
e
asdxscddasdcf
IsDivisibleV2
DateTime and TimeSpan comparisons
Dijkstra’s shortest path algorithm
ss