Has XML Attribute For Property - CSharp System.Xml

CSharp examples for System.Xml:XML Attribute

Description

Has XML Attribute For Property

Demo Code


using System.Xml;
using System.Runtime.Remoting.Messaging;
using System.Linq;
using System;//w  w  w  . j  a  va 2  s. co  m

public class Main{
        public static bool HasAttributeForProperty(this XmlElement element, string propertyName)
    {
      return element.HasAttribute(propertyName.ToCamelCase());
    }
}

Related Tutorials