I am implementing an eventhandler for ObservableCollection of Product.
I have a NotifyCollectionChangedEventArgs e. e.NewItems[0] returns the first object that has been changed. But this is an object, meaning it is not a Product, the Product is encapsulated in the object somehow, but I am not sure how to e开发者_如何学Pythonxtract the Product from this object.
tempPVM is of type "ObjectTypeA" :)
Please refer the following screenshot. :)
The object is the product - it's just not statically typed that way. You can just cast:
Product firstNewProduct = (Product) e.NewItems[0];
精彩评论