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
Enumerable Range
array print 2nd half first and 1 half later
recursive solution for subset sum
Preprocessor
vttrtbrbt
code source
test
Finally statement called after return
Intuit // C# // listing_4.2 (Converting / Parsing)
inheritance with virtual orride