LINQ Query question

Hi,
I have a data table. I like to add a column with value in a loop (index + ddmmyyyy) for this data table. How to do that using LINQ? Would it be any faster than using the loop and assigning the value to the column?

Thank you,

Whether it’s faster or not depends entirely on exactly what you’re trying to do.

Try both and see what works for you.

Hi A_Learner

Attached below you can find a possible solution.
Main.xaml (12.6 KB)

Cheers!

have a look at the different options

in your case a combination

  • preparing a datatable with an autoincrement, a set default value, an computed datacolumn
  • combined with a merge datatable

would be also an option, to name an alternate approach

Using LINQ for Data Column Updates has some contstraints and some implementations do risk an unneeded Blackboxing.

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