Last active
December 8, 2021 22:04
-
-
Save hperantunes/6898b13257615169c560d2e5bbe83e19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var a = new string[] { "something", "something else" }; | |
var b = new string[] { "something", "something else" }; | |
Console.WriteLine(a == b); // result is False, these 2 arrays don't have the same reference | |
Console.WriteLine(a.SequenceEqual(b)); // result is True, these 2 arrays have the same contents in the same order | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment