Are you trying to return data from a method?
If so, you should just end the request with the help select A, which will create the same type as A.
If not, you can use an anonymous type just like you use a regular type.
For instance:
var results = from ... select new { A.Product, A.Qty };
foreach(var thing in results) {
Console.WriteLine("{0}: {1}", thing.Product, Thing.Qty);
}
EDIT . To do this in a list, call ToList, for example:
var resultsList = results.ToList();
source
share