System.Xml.Tests.TCFullEndElement.TCPI.pi_5 C# (CSharp) Method

pi_5() public method

public pi_5 ( ) : int
return int
            public int pi_5()
            {
                using (XmlWriter w = CreateWriter())
                {
                    try
                    {
                        w.WriteStartElement("Root");
                        w.WriteProcessingInstruction(String.Empty, "test");
                    }
                    catch (ArgumentException e)
                    {
                        CError.WriteLineIgnore("Exception: " + e.ToString());
                        CError.Compare(w.WriteState, (WriterType == WriterType.CharCheckingWriter) ? WriteState.Element : WriteState.Error, "WriteState should be Error");
                        return TEST_PASS;
                    }
                }
                CError.WriteLine("Did not throw exception");
                return TEST_FAIL;
            }