I am migrating an application from vb6 to vb.net.
The application has some checkboxes and dropdowns whose values we can store in a file. For this it uses propertybag writeproperties to return a variant which is then written to a file by file put.
Similarly for loading the settings the file is loaded using file get and a variant is passed. the property bag content is then loaded using the variant and the properties are set.
**application code:**
dim bytarray() as byte
bytArray = mOptions.State
**usercontrol code:**
Public Property Get State() As Variant
Dim pb As New PropertyBag
With pb
.WriteProperty "property1", m_property1
.WriteProperty "property2", m_property2
.WriteProperty "property3", m_property3
State = .Contents
End With
End Property
What will be the right way to do this in vb.net? I have to use the previously saved files as well.
Thanks.