I want to convert the items entered to a String list to:
System.Collections.ObjectModel.ReadOnlyCollection<string>
I have tried using:
(System.Collections.ObjectModel.ReadOnlyCollection<string>)listname
But it returns an error.
The constructor of ReadOnlyCollection accepts an IList
Here is some reference http://msdn.microsoft.com/en-us/library/ms132476.aspx
var myreadonlycollection = new ReadOnlyCollection<string>(listname);