Is True in XML String - CSharp System.Xml

CSharp examples for System.Xml:XML String

Description

Is True in XML String

Demo Code

// The .NET Foundation licenses this file to you under the MIT license.
using System.Xml;
using System.Runtime;
using System.Globalization;
using System.Collections.Generic;

public class Main{
        // FIX for 7455
        public static bool IsTrue(string booleanValue)
        {/*from  w  w w  .  j av a2s. com*/
            if (string.IsNullOrEmpty(booleanValue))
            {
                return false;
            }

            return XmlConvert.ToBoolean(booleanValue);
        }
}

Related Tutorials