C
C#3y ago
Bujju

Line-seperated list from KeyValuePair

I have a KeyValuePair<string, string>, and I would like to make a line-separated list like the following: [Key]: [Value] [Key]: [Value] [Key]: [Value] How could I do that?
7 Replies
Angius
Angius3y ago
You mean, you'd like to print them to console or something?
Bujju
BujjuOP3y ago
No, I need it as a string.
Angius
Angius3y ago
Join it with newline as a separator, then
Bujju
BujjuOP3y ago
How do I do that?
Angius
Angius3y ago
string.Join() And '\n' or Environment.NewLine
Bujju
BujjuOP3y ago
Thanks How would I make the list show both the Keys and the Values?
Angius
Angius3y ago
You can try .Select()ing the list into strings
Want results from more Discord servers?
Add your server