I have a list of custom objects. These are actually the objects that I store in the IEnumerable collection. I want to convert the list to a string separated by commas, but I want only one specific property. How do I build a comma separated string with a specific property from a list of user objects?
I know that I can create a comma-separated list using "Foreach / For (int i .... " but I think there is a simple and better way to do this. So what would be so easy?
This is my list.
IEnumerable<BAL.Category> categories = chklCategories.CheckedItems.Cast<BAL.Category>();
source share