I have a list,in which every item is a list of stings themselves. How do I check whether all the individual items are same?
static void Main(string[] args)
{
var myList = new List<List<string>>();
var myItem1 = new List<string> { "str1", "str2" };
var myItem2 = new List<string> { "str1", "str2" };
myList.Add(myItem1);
myList.Add(myItem2);
var total = ?? // <- I'm stuck here
Console.WriteLine(total);
Console.ReadKey();
}
Now I want to check if every item inside myList are equal. I did try this one:Check if two list have the same items, but could not resolve.