Preciso obter a primeira linha de uma coluna através de uma expressão linq

Olá comunidade. Estou com um erro em uma expressão referente à obter a primeira linha de uma coluna. Poderiam me ajudar ou sugerir uma nova forma de obter?

Hi @devrpa746 ,

Could you provide us with the Expression used ? Also what is the Error message shown ?


Capturar

@devrpa746 ,

Could you let us know what are you trying to perform ?

The above Expression is a Code Snippet which creates a Datatable and assigns another Datatable value to it.

You are then retrieving one of it’s column values.

Maybe the expression which you wanted to use is the below :

arquivoCriaPO.AsEnumerable().FirstOrDefault().Item("FORNECEDOR").ToString

Here, it is assuming that the variable arquivoCriaPO is a datatable variable which is already created.

Just use the above expression instead of the one you have used and let us know if it gives out an error.

Funcionou perfeitamente. Obrigada!

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