Martin,
Yes, there is, you use the indexer, like this:
this.newMetainfosRow["JournalName"]
Note that you have to cast the return value to the type that you want,
in this case, it seems like a string, so you should do this:
string field = "JournalName"
string value = (string) this.newMetainfosRow[field];
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Martin Pöpping" <(E-Mail Removed)> wrote in message
news:ecpg5e$932$(E-Mail Removed)...
> Hello,
>
> I´ve a problem with accessing the fields of a data row.
>
> I created a row of my table "Metainfos":
>
> private fp_databaseDataSet.MetainfosRow newMetainfosRow;
>
> and then I can access for example the field "JournalName" in this
> Metainfos-Table:
>
> this.newMetainfosRow.JournalName
>
>
> My question is now, if there is any solution to access the field with
> using a variable like:
>
> String field = "JournalName"
>
> and then something like
>
> this.newMetainfosRow.Field(field)
>
> or something like that.
>
>
>
> Regards,
>
> Martin