How can I copy a collection of items in a comboBox to a StringCollection in my C# application? I’m only interested in capturing the string text for each item in their respective order. I am trying to make a MRU file list that is saved between sessions, so I would like to copy comboBox.Items to StringCollection Properties.Settings.Default.MostRecentlyUsedHexFiles. Any thoughts or suggestions you may have would be appreciated. Thanks.
How can I copy a collection of items in a comboBox to a StringCollection
Share
You should be able to loop over the combobox.items and simply use stringcollection.Add() to add the string to the collection.
The tostring method will perform as described here:
So something like: