19# Overloading Constructors Object Oriented Programming
///////////////
//[Link]//
//\\\\\\\\\\\\
using System;
using [Link];
using [Link];
using [Link];
using [Link];
namespace darklter
{
internal class Product
{
public int productID { get; set; }
public string productName { get; set; }
public string productDescription { get; set; }
public int productStock { get; set; }
public float productPrice { get; set; }
public Product(int productID, string productName, string
productDescription, int productStock, float productPrice)
{
[Link] = productID;
[Link] = productName;
[Link] = productDescription;
[Link] = productStock;
[Link] = productPrice;
}
public Product(int productID, string productName, int productStock, float
productPrice)
{
[Link] = productID;
[Link] = productName;
[Link] = productStock;
[Link] = productPrice;
}
public Product() { }
}
}
///////////////
//[Link]//
//\\\\\\\\\\\\
using System;
namespace darklter
{
class Program
{
static void Main(string[] args)
{
Product p1 = new Product(1, "Milk", "Milky",5,150);
Product p2 = new Product(1, "Milk", 5, 150);
Product p3 = new Product();
}
}
}