XmlAttribute StructureDelta Engine Documentation
Holds a name and value text pair View code on GitHub

Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public struct XmlAttribute

The XmlAttribute type exposes the following members.

Constructors

  NameDescription
Public methodXmlAttribute
Initializes a new instance of the XmlAttribute class
Top
Fields

  NameDescription
Public fieldName
Public fieldValue
Top
Remarks

Tests: DeltaEngine.Content.Xml.Tests.XmlAttributeTests
Examples

4 unit tests call DeltaEngine.Content.Xml.XmlAttribute
[Test]
public void ConstructorWithObject()
{
    var attribute = new XmlAttribute("name", DayOfWeek.Friday);
    Assert.AreEqual("name", attribute.Name);
    Assert.AreEqual("Friday", attribute.Value);
}
[Test]
public void ConstructorWithFloat()
{
    var attribute = new XmlAttribute("name", 2.1f);
    Assert.AreEqual("name", attribute.Name);
    Assert.AreEqual("2.1", attribute.Value);
}
[Test]
public void ConstructorWithDouble()
{
    var attribute = new XmlAttribute("name", 3.14);
    Assert.AreEqual("name", attribute.Name);
    Assert.AreEqual("3.14", attribute.Value);
}
See Also