I have this code:
HashSet<int> arr = new HashSet<int> { 1, 1, 2 };
HashSet<List<int>> arrOfarr = new HashSet<List<int>>();
arrOfarr.Add(new List<int> { 1,2,3 });
arrOfarr.Add(new List<int> { 1,2,3 });
Due to arr is a Hashset so obviously it returns {1,2} but I am wondering why arrOfarr returns both similar arrays. How does it works? How to change that to not return duplicate arrays?