+1  A: 

Anonymous types can be accessed only from the method where they are created.

You say

"i want to access test.stockdescid and test.barcode"

But "test" is a collection, and the properties you want to access are on the items of the collection, not on the collection itself.

You don't have a test.barcode but rather test.First().barcode and so on.

That said, I don't clearly understand what you need to do. Can you try to be more clear about your goal?

Matteo Mosca
test.First().barcode.ToString() is it true?
programmerist
Is it true? what do you mean?
Matteo Mosca
A: 

What do you mean "get test all data"?

You can write...

test.ToList().ForEach(i => i.DoSomething());

if that helps?

fearofawhackplanet
NO i need : ReturnMsg = CardID_Barcode.ToList().ForEach(i => i.barcode.ToString()); thanks :)
programmerist