I have a string with the list of items. e.g. str = "first,second,third,fourth,fifth"
So i’ll be splitting them to fit into the below codes. as i am joining the datatables.
(From r In joinDT.AsEnumerable
Let first = If(String.IsNullOrEmpty(r("First").ToString),r("First_1").ToString,r("First").ToString)
Let second= If(String.IsNullOrEmpty(r("Second").ToString),r("Second_1").ToString,r("Second").ToString)
Let dr = {r("Fifth").ToString,r("Fourth").ToString,second,r("Third").ToString,first}.ToArray
Select resultDT.Rows.Add(dr)).CopytoDataTable
Problem is, the dr array will always change and not always be the same. Therefore I’ve put the values into an array.
So i’ll use something like
Let dr = array
But because it detects r as a string instead of the r that is to be from the JoinDT.
How do i do this?