Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active April 20, 2017 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/08a657a9acfa9ac6bbfcb467db4c883b to your computer and use it in GitHub Desktop.
Save bjoerntx/08a657a9acfa9ac6bbfcb467db4c883b to your computer and use it in GitHub Desktop.
public class ProductBlock
{
private List<Product> _products;
public List<Product> Products
{
get { return _products; }
set
{
_products = value;
foreach (Product product in _products)
{
this.BlockSum += product.Price;
}
}
}
public int BlockSum { get; internal set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment