Popular Posts
Build an OpenVPN server on android device Preparation An android device, in this case, Sony xperia Z is used Root permission required Linux Deploy for deploy i... javax.net.ssl.SSLHandshakeException: Connection closed by peer in Android 5.0 Lollipop Recently, there is a error occurs when access website via ssl connection like below although it worked fine several days ago. // Enable SSL... SwiXml - Layout BorderLayout BorderLayoutPane.xml <?xml version="1.0" encoding="UTF-8"?> <panel layout="BorderLayout...
Stats
Quick array compare
string[] array1 = { "A", "B", "C", "D" };
string[] array2 = { "B", "C", "D", "E" };
string[] array3 = { "C", "D", "A", "B" };
string[] array4 = { "A", "B", "C", "D" };

Console.WriteLine("1 Equals 2 : {0}", array1.Equals(array2));  // false
Console.WriteLine("1 Equals 3 : {0}", array1.Equals(array3));  // false
Console.WriteLine("1 Equals 4 : {0}", array1.Equals(array4));  // false

Console.WriteLine("1 SequenceEqual 2 : {0}", array1.SequenceEqual(array2));  // false
Console.WriteLine("1 SequenceEqual 3 : {0}", array1.SequenceEqual(array3));  // false
Console.WriteLine("1 SequenceEqual 4 : {0}", array1.SequenceEqual(array4));  // true

Console.WriteLine("1 Except 2 : {0}", !array1.Except(array2).Any());  // false
Console.WriteLine("1 Except 3 : {0}", !array1.Except(array3).Any());  // true
Console.WriteLine("1 Except 4 : {0}", !array1.Except(array4).Any());  // true