Click here to Skip to main content
15,887,683 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen23-Dec-16 3:01
professionalEddy Vluggen23-Dec-16 3:01 
GeneralRe: INI - read multiline! Pin
User 989707423-Dec-16 3:09
User 989707423-Dec-16 3:09 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen23-Dec-16 3:18
professionalEddy Vluggen23-Dec-16 3:18 
GeneralRe: INI - read multiline! Pin
User 989707423-Dec-16 3:31
User 989707423-Dec-16 3:31 
GeneralRe: INI - read multiline! Pin
User 989707423-Dec-16 3:40
User 989707423-Dec-16 3:40 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen23-Dec-16 4:17
professionalEddy Vluggen23-Dec-16 4:17 
GeneralRe: INI - read multiline! Pin
User 989707423-Dec-16 4:26
User 989707423-Dec-16 4:26 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen23-Dec-16 4:33
professionalEddy Vluggen23-Dec-16 4:33 
Putting the values directly in the tag has its limits; imagine you put the value "<test" in="" there.<pre="" lang="cs">
<xml>
<mysetting><test</mysetting>
</xml>
As you can see, saving that string would cause the XML to be malformed. The easy solution to both problems is to encode your values in base64 (and decode them when reading).

To convert a value to base64;
VB
Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("Hello world"))


To convert back to your value from base64;
VB
System.Text.Encoding.UTF8.GetString(Convert.FromBase64String("base64charshere"))

Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: INI - read multiline! Pin
User 989707423-Dec-16 4:52
User 989707423-Dec-16 4:52 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen23-Dec-16 8:35
professionalEddy Vluggen23-Dec-16 8:35 
GeneralRe: INI - read multiline! Pin
User 989707423-Dec-16 23:20
User 989707423-Dec-16 23:20 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen24-Dec-16 2:55
professionalEddy Vluggen24-Dec-16 2:55 
GeneralRe: INI - read multiline! Pin
User 989707412-Dec-16 7:33
User 989707412-Dec-16 7:33 
GeneralRe: INI - read multiline! Pin
Richard MacCutchan12-Dec-16 22:09
mveRichard MacCutchan12-Dec-16 22:09 
GeneralRe: INI - read multiline! Pin
User 989707412-Dec-16 23:59
User 989707412-Dec-16 23:59 
GeneralRe: INI - read multiline! Pin
Richard MacCutchan13-Dec-16 0:03
mveRichard MacCutchan13-Dec-16 0:03 
GeneralRe: INI - read multiline! Pin
User 989707413-Dec-16 0:14
User 989707413-Dec-16 0:14 
GeneralRe: INI - read multiline! Pin
User 989707413-Dec-16 1:51
User 989707413-Dec-16 1:51 
GeneralRe: INI - read multiline! Pin
Richard MacCutchan13-Dec-16 5:50
mveRichard MacCutchan13-Dec-16 5:50 
GeneralRe: INI - read multiline! Pin
User 989707413-Dec-16 6:13
User 989707413-Dec-16 6:13 
GeneralRe: INI - read multiline! Pin
Richard MacCutchan13-Dec-16 6:25
mveRichard MacCutchan13-Dec-16 6:25 
GeneralRe: INI - read multiline! Pin
User 989707413-Dec-16 6:34
User 989707413-Dec-16 6:34 
QuestionHow do I make a button to save combobox theme? Pin
Member 1289787210-Dec-16 14:32
Member 1289787210-Dec-16 14:32 
AnswerRe: How do I make a button to save combobox theme? Pin
Richard MacCutchan10-Dec-16 20:50
mveRichard MacCutchan10-Dec-16 20:50 
QuestionLoading a combobox from the selection of a previous combobox in visual basic Pin
CharlesGuru8-Dec-16 22:41
CharlesGuru8-Dec-16 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.