UpTest > .Net Technologies > C# Test

Test: C# Test

Question 1: Prev Next Hide answers
Which of the following code snippets converts an IEnumerable<string> into a string containing comma separated values?
public static string ConvertToString(IEnumerable<T> source)
{
    return new List<T>(source).ToArray();
}
0 votes
public static string ConvertToString(IEnumerable<T> source)
{
    return  string.Join(",",source.ToArray());
}
2 votes
public static string ConvertToString(IEnumerable<T> source)
{
    return  source.ToString();
}
1 votes
public static string ConvertToString(IEnumerable<T> source)
{
    return  string.Join(source.ToArray());
}
0 votes
Please login to submit your answer.