using System.Collections.Generic;
public static List<Bet> Bets = new List<Bet>();
public static void Main()
Bets.Add(new Bet { BillNo = "N190501001", BetAmount = 10, WinLoss = 12 });
Bets.Add(new Bet { BillNo = "N190501002", BetAmount = 10, WinLoss = 0 });
CounterWithBetAmount counterWithBetAmount = new CounterWithBetAmount(Bets);
CounterWithoutBetAmount counterWithoutBetAmount = new CounterWithoutBetAmount(Bets);
Console.WriteLine("Please output the Calculate result.");
public string BillNo {set;get;}
public decimal BetAmount {set;get;}
public decimal WinLoss {set;get;}
public class CounterWithBetAmount
public CounterWithBetAmount(List<Bet> bets)
public decimal Calculate()
public class CounterWithoutBetAmount
public CounterWithoutBetAmount(List<Bet> bets)
public decimal Calculate()