System.Xml.Tests.TCAutoComplete.var_5 C# (CSharp) Méthode

var_5() public méthode

public var_5 ( ) : int
Résultat int
        public int var_5()
        {
            using (XmlWriter w = CreateWriter())
            {
                try
                {
                    w.WriteStartElement("Root");
                    w.WriteEndElement();
                    w.WriteEndElement();
                }
                catch (InvalidOperationException 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;
        }