Get list of properties from List of objects

LINQ is the answer. You can use it to “project” from your object collection to another collection – in this case a collection of object property values.

List<string> properties = objectList.Select(o => o.StringProperty).ToList();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)