Popular Posts
Enable SSL connection for Jsoup import org.jsoup.Connection; import org.jsoup.Jsoup; import javax.net.ssl.*; import java.io.IOException; import java.security.KeyManagement... 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... Change the AppDomain's Base Directory and Environment Directory // Update AppDomain's Base Directory string root_path = "c:\\temp\\"; AppDomain.CurrentDomain.SetData("APPBASE", roo...
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