Reputation: 43
I have some different settings type and assigned values which need to read it during the runtime as per the customer choice.
Type of the settings are specializedstringcollection and want to call it from the method ReadString() ;
public static void ReadStrings(StringCollection MyString)
{
// Reading from settings as per user decision
List<string> lines =Properties.Settings.Default.MyString.Cast<string>().ToList();
The code is giving an error ;
"'object' does not contain a definition for 'Cast' and the best extension method overload 'Queryable.Cast(IQueryable)'
Would you please let me know how can i read different settings types as per the user decision
Upvotes: 0
Views: 54