Issue getting the value from a Row["Column"]

  • Thread starter Thread starter Carlos Sosa Albert
  • Start date Start date
C

Carlos Sosa Albert

Hi guys,

Fighting with C#...
I have this code, and I can't find what I'm doing wrong... Any hint, please?

foreach (DataRow myRow in myDataSet.Tables[0].Rows)
{
strMyString = myRow["MyColumn"];
}

Error: Cannot implicitly convert type 'object' to 'string'. An explicit
conversion exists (are you missing a cast?)

Thanks a lot!
 
Back
Top