Attribute Value from XElement - CSharp System.Xml

CSharp examples for System.Xml:XML Element

Description

Attribute Value from XElement

Demo Code


using System.Xml.Linq;

public class Main{
        public static string AttributeValue(this XElement element, string attribute)
        {//from  w w  w.j  a va 2s  .co m
            return element.Attribute(attribute).Value;
        }
}

Related Tutorials