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
2010-06-24 10:54:15