public int attribute_2() { using (XmlWriter w = CreateWriter()) { w.WriteStartElement("Root"); w.WriteStartAttribute("attr1"); w.WriteEndElement(); } return CompareReader("<Root attr1=\"\" />") ? TEST_PASS : TEST_FAIL; }