1

I have a task where i am reading from flatfile and i want to replace the values where to space where i find tab. when i run the below script it is giving me error at runtime stating that Property set method not found. below screen shot shows the script and runtime error. any help is welcome Error screen at runtime

this is my script code

public override void Input0_ProcessInputRow(Input0Buffer Row)
{
    foreach (PropertyInfo dataColumn in Row.GetType().GetProperties())
    {
        if (dataColumn.Name.ToLower().EndsWith("_isnull") == false && dataColumn.PropertyType == typeof(string))
{
        object objValue = dataColumn.GetValue(Row, null);
        if (objValue != null)
        {
            string value = objValue.ToString();
            value.Replace("\t", " ");
            dataColumn.SetValue(Row, value, null);
        }
        }
    }
}
Aaron
  • 662
  • 8
  • 20
  • It seems that not all properties on `Input0Buffer` have a setter. Can you confirm this ? Check similar SO posts [here](http://stackoverflow.com/questions/12431869/c-sharp-reflection-setvalue-can-not-find-set-accessor) & [here](http://stackoverflow.com/questions/9364092/property-set-method-not-found-error-during-reflection) – Michael Oct 19 '16 at 14:47
  • got that part to work. I had the input0 to read only. Thanks.. – Aaron Oct 19 '16 at 14:56

0 Answers0