System.Xml.Tests.TCFullEndElement.TCCharEntity.charEntity_5 C# (CSharp) Méthode

charEntity_5() public méthode

public charEntity_5 ( ) : int
Résultat int
            public int charEntity_5()
            {
                using (XmlWriter w = CreateWriter())
                {
                    try
                    {
                        w.WriteStartElement("Root");
                        w.WriteCharEntity('\uD812');
                    }
                    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;
            }