System.Xml.Tests.TCFullEndElement.TCSurrogateCharEntity.surrogateEntity_7 C# (CSharp) Méthode

surrogateEntity_7() public méthode

public surrogateEntity_7 ( ) : int
Résultat int
            public int surrogateEntity_7()
            {
                using (XmlWriter w = CreateWriter())
                {
                    try
                    {
                        w.WriteStartElement("Root");
                        w.WriteSurrogateCharEntity('\uD9A2', '\uDE34');
                    }
                    catch (ArgumentException e)
                    {
                        CError.WriteLineIgnore("Exception: " + e.ToString());
                        CError.Compare(w.WriteState, WriteState.Error, "WriteState should be Error");
                        return TEST_PASS;
                    }
                }
                CError.WriteLine("Did not throw exception");
                return TEST_FAIL;
            }