/// <summary>
 ///
 /// </summary>
 /// <param name="column"></param>
 /// <param name="converter"></param>
 /// <param name="fieldValue"></param>
 /// <param name="innerException"></param>
 public TextDataFormatException(TextDataColumn column, ITextDataConverter converter, string fieldValue, Exception innerException)
     : base(null, innerException)
 {
     Column     = column;
     Converter  = converter;
     Fieldvalue = fieldValue;
     Message    = $"Conversion ({converter}) of string value '{fieldValue}' to type {column.DataType} failed. ";
 }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="column"></param>
        /// <returns></returns>
        public object this[TextDataColumn column]
        {
            get
            {
                var index = Columns.IndexOf(column, true);
                return(ItemArray[index]);
            }

            set
            {
                var index          = Columns.IndexOf(column, true);
                var convertedValue = _convert(value, column);
                ItemArray[index] = convertedValue;
            }
        }