NSoft.NFramework.Nini.Ini.IniSection.Contains C# (CSharp) Method

Contains() public method

public Contains ( string key ) : bool
key string
return bool
        public bool Contains(string key) {
            return (configList[key] != null);
        }

Usage Example

示例#1
0
        public void GetKey()
        {
            StringWriter writer = new StringWriter();

            writer.WriteLine("[Nini]");
            writer.WriteLine(" my key = something");
            IniDocument doc = new IniDocument(new StringReader(writer.ToString()));

            IniSection section = doc.Sections["Nini"];

            Assert.IsTrue(section.Contains("my key"));
            Assert.AreEqual("something", section.GetValue("my key"));
            Assert.IsFalse(section.Contains("not here"));
        }
All Usage Examples Of NSoft.NFramework.Nini.Ini.IniSection::Contains