System.Xml.Tests.TCElement.element_4 C# (CSharp) Méthode

element_4() public méthode

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