I am getting the error System.Collections.Generic.List`1[System.String] when i try to use String.Join in a list of result.
For instance i have two list like this:
var list1= new List<string>{"string1","string2"};
var list2= new List<string>{"string1"};
Then i want to get a message with the string that doesn't appear on list2
var resultList1 = list1.Except(list2).ToList(); // this line get a list with "string2"
when i use String.Join i get the error System.Collections.Generic.List`1[System.String]. Also i tried resultList1.Cast<List>() instead resultList1 with same outcome.
var message = "List strings not found:\n\n"
+ String.Join(",", $"\n\n{resultList1}\n\n");
string.Join()needs to be a collection.