Skip to content

Conversation

@chaoobject001
Copy link

On line 93 and line 94, based on the variables "cartTotal" and "arrayTotal",
it seems to imply that author intends to show difference in getting total value from
a ShoppingCart instance that also implements IEnumerable V.S.
an array of Product objects
In the original method, both "cartTotal" and "arrayTotal" are assigned with same set of products, from
IEnumerable products
This seems to contradict with the idea of comparison.
Thanks for the source code though - it has been helpful.

On line 93 and line 94, based on the variables "cartTotal" and "arrayTotal", 
it seems to imply that author intends to show difference in getting total value from 
a ShoppingCart instance that also implements IEnumerable<Product> V.S.
an array of Product objects
In the original method, both "cartTotal" and "arrayTotal" are assigned with same set of products, from  
IEnumerable<Product> products
This seems to contradict with the idea of comparison.
Thanks for the source code though - it has been helpful.
@ricktron3000
Copy link

This is accurate although there are several extra lines added in the commit that aren't required. The only change should be to the arrayTotal variable assignment on line 94.

decimal arrayTotal = productArrray.TotalPrices();

@chaoobject001
Copy link
Author

@ricktron3000
Agreed. The other lines (other than line 94) are from my own example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants