View Single Post
  #2 (permalink)  
Old February 15th, 2015, 01:39 PM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Hi Mark,

I don't know why it would do that. I certainly can't imagine why my solution would work but yours wouldn't, at least not for the fields.

But it seems to not like the fields, so you may be able to work around it by converting them into properties instead of fields. Try using these declarations:

Code:
public string ItemName { get; set; }
public decimal PriceEach { get; set; }
public decimal Quantity { get; set; }
public decimal TotalPrice { get; set; }
Let me know if that works.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)