Question:Which of the following code snippets converts an IEnumerable<string> into a string containing comma separated values?
A public static string ConvertToString(IEnumerable<T> source) { return new List<T>(source).ToArray(); }
B public static string ConvertToString(IEnumerable<T> source) { return string.Join(",",source.ToArray()); }
C public static string ConvertToString(IEnumerable<T> source) { return source.ToString(); }
D public static string ConvertToString(IEnumerable<T> source) { return string.Join(source.ToArray()); }
+ AnswerB
+ Report