System.Xml.Tests.TCFullEndElement.TCWriteValue.TCWriteBinHex.BinHex_7 C# (CSharp) Méthode

BinHex_7() public méthode

public BinHex_7 ( ) : int
Résultat int
                public int BinHex_7()
                {
                    using (XmlWriter w = CreateWriter())
                    {
                        try
                        {
                            w.WriteStartElement("root");
                            w.WriteBinHex(null, 0, 0);
                        }
                        catch (ArgumentNullException)
                        {
                            if (WriterType == WriterType.CustomWriter)
                            {
                                CError.Compare(w.WriteState, WriteState.Element, "WriteState should be Element");
                            }
                            else
                            {
                                CheckErrorState(w.WriteState);
                            }
                            return TEST_PASS;
                        }
                    }
                    CError.WriteLine("Did not throw exception");
                    return TEST_FAIL;
                }