-1

I have an IEnumerable called day. I am trying to get all the elements from the IEnumerable and convert them to a string. Using

string day = day.First().ToString()

I am able to get the first element. I have tried using .ToList() and .ToArray() both do not print out the elements.

Aaron
  • 4,380
  • 19
  • 85
  • 141
  • 1
    The answer of this question is given [here](http://stackoverflow.com/questions/480399/convert-listof-object-to-listof-string). – yanis Feb 04 '16 at 16:52
  • @Aaron I believe you'll find what you need in the linked duplicate question, if not let me know and we can re-open this one and help you out. – Michael Edenfield Feb 04 '16 at 16:56

1 Answers1

1

You don't need linq for this, you can try this:

var days = new List<int> {1,2,3};
var result = String.Join(" ", days);//Out: 1 2 3
Carra
  • 17,808
  • 7
  • 62
  • 75