Come posso convertire i "nonLetters" IEnumerable<char>
in un string[]
in modo che possa essere utilizzato con String.Join?Come convertire IEnumerable <char> in string [] così posso usarlo con String.Join?
string message = "This is a test message.";
var nonLetters = message.Where(x => !Char.IsLetter(x));
Console.WriteLine("There are {0} non-characters in \"{1}\" and they are: {2}",
nonLetters.Count(),
message,
String.Join(", ", nonLetters.ToArray())
);
Questo non produce una stringa [] come richiesto da Edward. –