Thursday, June 23, 2016

List to Comma Seperated String in C#


 var SelectedVals = loadedObject.somelist.Select(s =>  s.string).ToList();
 loadedObject.Values = string.Join(",", SelectedVals);

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software