i have an invoice column where i have split with # and update it in invNum, InvNum_Amt Coulmn I have combine both Splited invoicenum and Amount, and amt column needs to be clone same as invoice Amount.
I need this to be done using LinQ query, please help me on this
' Assuming dt is your DataTable
Dim dt As DataTable = YourDataTableVariable
' Using LINQ to update values
dt.AsEnumerable().ToList().ForEach(
Sub(x)
x("InvNum") = x("Invoice Number").ToString().Split("#"c)(0).Trim()
x("InvNum_Amt") = $"{x("InvNum")}_{x("Invoice Amount")}"
End Sub
)