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!

Re: Issue getting the value from a Row["Column"] by Carlos

Carlos
Fri Jun 08 16:56:55 CDT 2007

Nevermind... I'm an idi0t -.-

"Carlos Sosa Albert" <betun (at) hotmail> wrote in message
news:OzKYBugqHHA.1168@TK2MSFTNGP03.phx.gbl...
> 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!