I have a ListView (in WPF app) which I fill it programmatically:
l1.Items.Add(new
{
AA = aa++,
Description = descriptions[k],
Shop = names[k + 2],
Price = price
});
I want to take the first row and the value of column price. I can take the object
object b = l1.Items.GetItemAt(0);
but I can't take the price.
You can use the dynamic
keyword for that.
dynamic b = l1.Items.GetItemAt(0);
var price = b.Price;