I was wondering if anyone knows a good way of writing this. I have a list of key value pairs. The key is a simple string and the value is a list of strings. I\'m trying to write
You could use String.Join to concatenate your List into a single string with a given delimiter:
List
string
File.WriteAllLines(@"C:\Users\S\Downloads\output.txt", xEleAtt.Select(x => x.Key + " Val's: " + string.Join(",", x.Value.ToArray()).ToArray());