public void CtorTest1()
        {
            using (StringReader reader = new StringReader (String.Empty))
            using (TextFieldParser t = new TextFieldParser (reader))
            {
                    Assert.AreEqual (string.Empty, t.ReadToEnd (), "#A1");
            }

            using (StringReader reader = new StringReader ("abc"))
            using (TextFieldParser t = new TextFieldParser (reader))
            {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#A2");
            }

            using (MemoryStream reader = new System.IO.MemoryStream (Encoding.ASCII.GetBytes("abc")))
            using (TextFieldParser t = new TextFieldParser (reader, Encoding.ASCII))
            {
                Assert.AreEqual ("abc", t.ReadToEnd (), "#A3");
            }

            using (MemoryStream reader = new System.IO.MemoryStream (Encoding.ASCII.GetBytes ("abc")))
            using (TextFieldParser t = new TextFieldParser (reader, Encoding.Unicode))
            {
                Assert.IsTrue ("abc" != t.ReadToEnd (), "#A4");
            }

            using (MemoryStream reader = new System.IO.MemoryStream (Encoding.ASCII.GetBytes ("abc")))
            using (TextFieldParser t = new TextFieldParser (reader, Encoding.Unicode, true))
            {
                Assert.IsTrue ("abc" != t.ReadToEnd (), "#A5");
            }

            using (MemoryStream reader = new System.IO.MemoryStream (Encoding.Unicode.GetBytes ("abc")))
            using (TextFieldParser t = new TextFieldParser (reader, Encoding.ASCII, true))
            {
                Assert.IsTrue ("abc" != t.ReadToEnd (), "#A6");
            }

            // Unicode string with bom
            using (MemoryStream reader = new System.IO.MemoryStream (new byte [] {0xFF, 0xFE, 0x61, 0, 0x62, 0, 0x63, 0}))
            using (TextFieldParser t = new TextFieldParser (reader, Encoding.ASCII, true))
            {
                Assert.AreEqual ("abc", t.ReadToEnd (), "#A7");
            }

            // UTF8 string with bom
            using (MemoryStream reader = new System.IO.MemoryStream (new byte [] { 0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63 }))
            using (TextFieldParser t = new TextFieldParser (reader, Encoding.ASCII, true))
            {
                Assert.AreEqual ("abc", t.ReadToEnd (), "#A8");
            }

            try {
                using (StringReader reader = new StringReader ("abc")) {
                    using (TextFieldParser t = new TextFieldParser (reader)) {
                        Assert.AreEqual ("abc", t.ReadToEnd (), "#A9");
                    }
                    reader.ReadToEnd ();
                }
                Assert.Fail ("Excepted 'ObjectDisposedException'");
            } catch (ObjectDisposedException ex) {
                Helper.RemoveWarning (ex);
            } catch (Exception ex) {
                Helper.RemoveWarning (ex);
                Assert.Fail("Excepted 'ObjectDisposedException'");
            }

            using (MemoryStream reader = new System.IO.MemoryStream (new byte [] { 0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63 })) {
                using (TextFieldParser t = new TextFieldParser (reader, Encoding.UTF8, true, true)) {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#A10");
                }
                reader.ReadByte ();
            }

            using (MemoryStream reader = new System.IO.MemoryStream (Encoding.UTF8.GetBytes ("abc")))
            using (TextFieldParser t = new TextFieldParser (reader)) {
                Assert.AreEqual ("abc", t.ReadToEnd (), "#A11");
            }

            string tmpfile;

            tmpfile = System.IO.Path.GetTempFileName ();
            try {
                Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText (tmpfile, "abc", false);

                using (TextFieldParser t = new TextFieldParser (tmpfile)) {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#B01");
                }
            } finally {
                System.IO.File.Delete (tmpfile);
            }

            tmpfile = System.IO.Path.GetTempFileName ();
            try {
                Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText (tmpfile, "abc", false);

                using (TextFieldParser t = new TextFieldParser (tmpfile, Encoding.ASCII)) {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#B02");
                }
            } finally {
                System.IO.File.Delete (tmpfile);
            }

            tmpfile = System.IO.Path.GetTempFileName ();
            try {
                Microsoft.VisualBasic.FileIO.FileSystem.WriteAllBytes (tmpfile, new byte [] {0xFF, 0xFE, 0x61, 0, 0x62, 0, 0x63, 0}, false);

                using (TextFieldParser t = new TextFieldParser (tmpfile, Encoding.Unicode)) {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#B03");
                }
            } finally {
                System.IO.File.Delete (tmpfile);
            }

            tmpfile = System.IO.Path.GetTempFileName ();
            try {
                Microsoft.VisualBasic.FileIO.FileSystem.WriteAllBytes (tmpfile, new byte [] { 0xFF, 0xFE, 0x61, 0, 0x62, 0, 0x63, 0 }, false);

                using (TextFieldParser t = new TextFieldParser (tmpfile, Encoding.UTF8, true)) {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#B04");
                }
            } finally {
                System.IO.File.Delete (tmpfile);
            }

            tmpfile = System.IO.Path.GetTempFileName ();
            try {
                Microsoft.VisualBasic.FileIO.FileSystem.WriteAllBytes (tmpfile, new byte [] { 0x61, 0x62, 0x63}, false);

                using (TextFieldParser t = new TextFieldParser (tmpfile, Encoding.UTF8, false)) {
                    Assert.AreEqual ("abc", t.ReadToEnd (), "#B04");
                }
            } finally {
                System.IO.File.Delete (tmpfile);
            }
        }