I'm still new to C#... I'm building a WPF application and I'm trying to apply some User Application Settings. It's easy to insert standard App Settings (int, double, string, etc). I've even got something like WindowState inserted.
I'd like to have a DirectoryInfo and/or FileInfo as savable settings instead of Strings.
Selected type: System.IO.File gives an error message "Abstract types are not supported".
Which makes sense, since how can you implement an abstract type as a setting.
Selected type: System.IO.FileInfo gives an error message of "Type 'System.IO.FileInfo' is not defined.".
Is DirectoryInfo/FileInfo not settable as App Settings? Is it possible? Worth the time? How can you determine what is usable as a setting and what isn't?
My experience with user settings is limited and I'm trying to expand upon my knowledge and this has me stumped.
edit: I tried to post some screenshots, but apparently I'm too new. I'm working inside of Visual Studio, Application Settings.
further notes:
http://msdn.microsoft.com/en-us/library/a65txexh.aspx
Application settings can be stored as any data type that is XML serializable or has a TypeConverter that implements ToString/FromString. The most common types are String, Integer, and Boolean, but you can also store values as Color, Object, or as a connection string.
DirectoryInfo di = new DirectoryInfo(@"C:\");
di.ToString();
Am I missing something, as it has ToString()...