class Discount
{
prop {get;set;} //some random properties
string PERCENTAGEDISCOUNT {get;set;}
string AMOUNTDISCOUNT {get;set;}
}
public Discount GetDiscountDetails(string discountType)
{
Discount dis = new Discount();
if(discountType==PERCENTAGEDISCOUNT)
{
dis.(your properties)
}
if(discountType==AMOUNTDISCOUNT)
{
dis.(your properties)
}
return dis
}