System.Xml.Tests.TCFullEndElement.TCWriteValue.TCWriteRaw.writerRaw_5 C# (CSharp) Méthode

writerRaw_5() public méthode

public writerRaw_5 ( ) : int
Résultat int
                public int writerRaw_5()
                {
                    using (XmlWriter w = CreateWriter())
                    {
                        string strraw = "abc";
                        char[] buffer = strraw.ToCharArray();

                        w.WriteStartElement("root");
                        w.WriteStartAttribute("xml", "lang", null);
                        w.WriteRaw(buffer, 1, 1);
                        w.WriteRaw(buffer, 0, 2);
                        w.WriteEndAttribute();
                        w.WriteEndElement();
                    }
                    return CompareReader("<root xml:lang=\"bab\" />") ? TEST_PASS : TEST_FAIL;
                }