/// <summary>
        /// Extends ConvertTo so that methods that return a specific type object given a Type parameter can be
        /// used as generic method and casting is not required.
        /// <example>
        /// multilinestringconverter.ConvertTo&lt;int&gt;(context, culture, value);
        /// </example>
        /// </summary>
        public static T ConvertTo <T>(this MultilineStringConverter multilinestringconverter, ITypeDescriptorContext context, System.Globalization.CultureInfo culture, Object value)
        {
            if (multilinestringconverter == null)
            {
                throw new ArgumentNullException("multilinestringconverter");
            }

            return((T)multilinestringconverter.ConvertTo(context, culture, value, typeof(T)));
        }
        /// <summary>
        /// Extends ConvertTo so that methods that return a specific type object given a Type parameter can be
        /// used as generic method and casting is not required.
        /// <example>
        /// typeconverter.ConvertTo&lt;int&gt;(value);
        /// </example>
        /// </summary>
        public static T ConvertTo <T>(this MultilineStringConverter typeconverter, Object value)
        {
            if (typeconverter == null)
            {
                throw new ArgumentNullException("typeconverter");
            }

            return((T)typeconverter.ConvertTo(value, typeof(T)));
        }
        public void ConvertTo()
        {
            var cvt = new MultilineStringConverter();

            AssertThrows <ArgumentNullException> (() =>
            {
                cvt.ConvertTo(null, null, "string", null);
            }, "#A1-1");

            AssertThrows <NotSupportedException> (() =>
            {
                cvt.ConvertTo(null, null, "string", typeof(int));
            }, "#A1-2");

            AssertThrows <NotSupportedException> (() =>
            {
                cvt.ConvertTo(null, null, "string", typeof(double));
            }, "#A1-3");

            object result = cvt.ConvertTo(null, null, "string", typeof(string));

            Assert.IsNotNull(result, "#A2-1");
            Assert.IsTrue(result.GetType() == typeof(string), "#A2-2");
            Assert.AreEqual("(Text)", (string)result, "#A2-3");

            string orig = @"This
is
a
multiline
string";

            result = cvt.ConvertTo(null, null, orig, typeof(string));
            Assert.IsNotNull(result, "#A3-1");
            Assert.IsTrue(result.GetType() == typeof(string), "#A3-2");
            Assert.AreEqual("(Text)", (string)result, "#A3-3");

            result = cvt.ConvertTo(null, null, 1234, typeof(string));
            Assert.IsNotNull(result, "#A4-1");
            Assert.IsTrue(result.GetType() == typeof(string), "#A4-2");
            Assert.AreEqual("1234", (string)result, "#A4-3");
        }