Adding Variable to Data table row c#

Hi !

I’am tring to insert a variable into a DataTable Row like this:

But I got error:
image

my “testrow” variable is set like this:

Please help,

Thanks !

HI @javierdavidh
Try
testrow["Column0"]

Regards
Sudharsan

when using c# you should use square brackets [ and ] instead of ()

Thanks !! I am not familiarized with c# syntax, I am having now a different error when declaring the string array:

Thanks in advance !

@javierdavidh Try this

new string[3]{ “Element 1”, “Element 2”, “Element 3”, “Element 4”};

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.