StringCollection changes on Settings.Default.Reload()

Posted by Ask on Stack Overflow See other posts from Stack Overflow or by Ask
Published on 2012-04-16T10:48:08Z Indexed on 2012/04/16 11:29 UTC
Read the original article Hit count: 173

Filed under:
|
|

In my app Settings.Default.test is a StringCollection. I don't understand why this code

    StringCollection col = new StringCollection();
    col.Add("1\r\n2\r\n");
    Settings.Default.test = col;
    Settings.Default.Save();
    Settings.Default.Reload();

Changes my text 1\r\n2\r\n to 1\n2\n on Reload. Is it default behavior or what? How to restore multiline text in my textbox on restart of my application?

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio