I have the code below:
List aa = (from char c in source
select new { Data = c.ToString() }).ToList();
But
IEnumerable e = (from char c in source
select new { Data = c.ToString() }).Select(t = > t.Data);
// or
IEnumerable e = from char c in source
select c.ToString();
// or
IEnumerable e = source.Select(c = > c.ToString());
Then you can call ToList()
:
List l = (from char c in source
select new { Data = c.ToString() }).Select(t = > t.Data).ToList();
// or
List l = (from char c in source
select c.ToString()).ToList();
// or
List l = source.Select(c = > c.ToString()).ToList();