本文整理汇总了C#中IniFile.SetFloat方法的典型用法代码示例。如果您正苦于以下问题:C# IniFile.SetFloat方法的具体用法?C# IniFile.SetFloat怎么用?C# IniFile.SetFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IniFile
的用法示例。
在下文中一共展示了IniFile.SetFloat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
//.........这里部分代码省略.........
// ---------------------------------------------------------------------------------
#region IniFile Clear function
testIni1.BeginGroup("MyGroup");
AssertEqual(testIni1.currentGroup, "MyGroup/");
testIni1.Clear();
testIni2.Clear();
AssertEqual(testIni1.count, 0);
AssertEqual(testIni1.keys.Count, 0);
AssertEqual(testIni1.values.Count, 0);
AssertEqual(testIni1.currentGroup, "");
AssertEqual(testIni2.currentGroup, "");
AssertEqual(testIni1.ToString(), "");
AssertEqual(testIni1, testIni2);
#endregion
#endregion
// ===================================================================================
#region IniFile groups
#region IniFile Set function
testIni1.SetInt("Key 1", 1);
AssertEqual(testIni1.count, 1);
AssertEqual(testIni1.keys.Count, 1);
AssertEqual(testIni1.values.Count, 1);
AssertEqual(testIni1.currentGroup, "");
testIni1.BeginGroup("Group 1");
testIni1.SetFloat("Key 2", 0.2f);
AssertEqual(testIni1.count, 1);
AssertEqual(testIni1.keys.Count, 1);
AssertEqual(testIni1.values.Count, 1);
AssertEqual(testIni1.currentGroup, "Group 1/");
testIni1.BeginGroup("Subgroup 1");
testIni1.SetDouble("Key 3", 0.3);
AssertEqual(testIni1.count, 1);
AssertEqual(testIni1.keys.Count, 1);
AssertEqual(testIni1.values.Count, 1);
AssertEqual(testIni1.currentGroup, "Group 1/Subgroup 1/");
testIni1.EndGroup();
AssertEqual(testIni1.count, 2);
AssertEqual(testIni1.keys.Count, 2);
AssertEqual(testIni1.values.Count, 2);
AssertEqual(testIni1.currentGroup, "Group 1/");
testIni1.SetBool("Subgroup 1/Key 4", true);
AssertEqual(testIni1.count, 3);
AssertEqual(testIni1.keys.Count, 3);
AssertEqual(testIni1.values.Count, 3);
AssertEqual(testIni1.currentGroup, "Group 1/");
testIni1.EndGroup();
AssertEqual(testIni1.count, 4);
AssertEqual(testIni1.keys.Count, 4);