Professional Documents
Culture Documents
How to create
and use classes
public Product(){}
namespace ProductMaintenance
{
class Product
{
}
}
public Product()
{
}
A read/write property
public string Code
{
get { return code; }
set { code = value; }
}
A read-only property
public decimal DiscountAmount
{
get
{
discountAmount = subtotal * discountPercent;
return discountAmount;
}
}