Nabin Agarwala

Nabin Agarwala

  • NA
  • 318
  • 50.4k

Can not convert from object type 'System.Data.DataRowView' to type 'Sy

Nov 6 2020 5:49 AM
Can not convert from object type 'System.Data.DataRowView' to type 'System.String' error coming please fix.
  1. string _fileName = @"D:\Personal\Documents\SalaryDetails.txt";  
  2.            StreamWriter writer = new StreamWriter(_fileName);  
  3.            for (int i = 0; i < lst.Items.Count; i++)  
  4.            {  
  5.                writer.WriteLine(Convert.ToString(lst.Items[i]));  
  6.            }  
  7.            writer.Close();  
 

Answers (2)