public class SaleItem
{
public string Name
{ get; set; }
public decimal Price
{ get; set; }
}
using System;
class Medication
{
public int Quantity { get; set; } = 30; // Has default value.
}
class Program
{
static void Main()
{
Medication med = new Medication();
// The quantity is by default 30.
Console.WriteLine(med.Quantity);
// We can change the quantity.
med.Quantity *= 2;
Console.WriteLine(med.Quantity);
}
}
30
60