System.ComponentModel.TypeConverter.GetConvertToException C# (CSharp) Method

GetConvertToException() protected method

protected GetConvertToException ( object value, Type destinationType ) : Exception
value object
destinationType Type
return Exception
        protected Exception GetConvertToException(object value, Type destinationType) {
            string valueTypeName;

            if (value == null) {
                valueTypeName = SR.GetString(SR.ToStringNull);
            }
            else {
                valueTypeName = value.GetType().FullName;
            }

            throw new NotSupportedException(SR.GetString(SR.ConvertToException, GetType().Name, valueTypeName, destinationType.FullName));
        }