Skip to content
QQ edited this page Jan 28, 2022 · 12 revisions

Welcome to the QSoft.Ini wiki!

hope this document can help your work.

Simple example

Setting setting = new Setting()
{
    IP = "127.0.0.1",
    Port = 88
};
string ini_str = IniConvert.SerializeObject(setting);
/*
[Setting]
IP=127.0.0.1
Port=88
*/
var deserialize = IniConvert.DeserializeObject<Setting>(ini_str);

Use attribute ignore exist property

public class Setting
{
    [IniIgnore]
    public string IP { set; get; }
    public int Port { set; get; }
}
string ini_str = IniConvert.SerializeObject(setting);
/*
[Setting]
Port=88
*/

Clone this wiki locally