How to pass variable for the column name in Select method of data table?

Hi @kkpatel

You can passed a variable this way

currQtrDT.AsEnumerable.Select(Function(f1) f1. Field(Of String)(str_varField) == CurrentRow(“name”).ToString)

where str_varField is a variable type of String

See @ppr LINQ learning materials for better understanding of LINQ syntax.

1 Like