System.Xml.Tests.TCFullEndElement.TCSurrogateCharEntity.surrogateEntity_6 C# (CSharp) Method

surrogateEntity_6() public method

public surrogateEntity_6 ( ) : int
return int
            public int surrogateEntity_6()
            {
                using (XmlWriter w = CreateWriter())
                {
                    try
                    {
                        w.WriteStartElement("Root");
                        w.WriteSurrogateCharEntity('\u1025', '\uD900');
                    }
                    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;
            }