System.Xml.Tests.TCFullEndElement.TCWriteValue.TCLookUpPrefix.lookupPrefix_1 C# (CSharp) Method

lookupPrefix_1() public method

public lookupPrefix_1 ( ) : int
return int
                public int lookupPrefix_1()
                {
                    using (XmlWriter w = CreateWriter())
                    {
                        try
                        {
                            w.WriteStartElement("Root");
                            string s = w.LookupPrefix(null);
                            w.Dispose();
                        }
                        catch (ArgumentException e)
                        {
                            CError.WriteLineIgnore("Exception: " + e.ToString());
                            CheckErrorState(w.WriteState);
                            return TEST_PASS;
                        }
                    }
                    CError.WriteLine("Did not throw exception");
                    return TEST_FAIL;
                }