您的位置:首页 > 编程语言 > C#

C# 写简单配置文件插件 SharpConfig 用法

2015-10-05 18:09 1076 查看
using SharpConfig;
Configuration config = Configuration.LoadFromFile(Application.streamingAssetsPath + "/sample.cfg");
Section section = config["General"];

string someString = section["SomeString"].Value;
int someInteger = section["SomeInteger"].GetValue<int>();
float someFloat = section["SomeFloat"].GetValue<float>();

object[] myArray = config["General"]["AnArray"].GetValue<object[]>();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: