According to this and this it should be possible to create custom classes and store them in My.Settings.
I tried doing what those articles recommended, but I can't get the most basic custom class to work:
VB Code:
Imports System.ComponentModel Imports System.Configuration <Serializable()> _ Public Class CustomSetting Inherits ApplicationSettingsBase Public Sub New() End Sub Public Sub New(ByVal mysetting As String) _MySetting = mysetting End Sub Private _MySetting As String <UserScopedSetting()> _ <SettingsSerializeAs(SettingsSerializeAs.Xml)> _ Public Property MySetting As String Get Return _MySetting End Get Set(value As String) _MySetting = value End Set End Property End Class
When I run the program, I get the following error:
I don't know what I'm doing wrong.Code:{"Configuration system failed to initialize"}




Reply With Quote