Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
I am trying to import/export my.settings. But encounter some error. I have this in a while loop reading the settings i have exported. And the settings are in (setting.Name,setting.PropertyValue.Tostring) format.
This seems to only work with string type settings. How do i make it work with all types? I tried this but gives error.
VB.NET:
Dim dataSplit = imput.Split(","c)
My.Settings(dataSplit(0))=dataSplit(1)
This seems to only work with string type settings. How do i make it work with all types? I tried this but gives error.
VB.NET:
Dim Type = My.Settings(dataSplit(0)).GetType()
My.Settings(dataSplit(0)) = CType(dataSplit(1), Type)