Created
November 7, 2013 10:37
-
-
Save csharpforevermore/7352567 to your computer and use it in GitHub Desktop.
C# - get a CSV of a property of IEnumerable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Car{ | |
public int Id {get; set;} | |
public string Make {get; set;} | |
public string Model {get; set;} | |
} | |
private string Get | |
var enumerableCollection = new List<Car>(); | |
... | |
var identities = string.Join(",", enumerableCollection.Select(o => o.Id)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment