Pass variable to linq?

Hey @fairymemay

Kindly check this now please…

It was due to a bracket mismatch.

OutputDT.AsEnumerable.Where(Function(x) _
	TypeVoucher.Contains(x("Premium").ToString) AndAlso
	x("Type Special").ToString.Equals("Yes") OrElse
	(x("Premium").ToString.Equals("เงินคืนเข้าบัญชีเงินฝาก SCB") Or x("Premium").ToString.Equals("เงินคืนเข้าบัตรเครดิต SCB")) AndAlso
	x("Type Special").ToString.Equals("Yes") AndAlso String.IsNullOrWhiteSpace(x("Account No").ToString)).ToArray

Thanks
#nK

3 Likes