I need some help, i have a public class object(CoinJar) but the problem now it does not seem to find void AddCoin(coinType....) its throwing an error "inconsistent accessibility parameter. How do i resolve this issue?
-
- [HttpPost]
- void AddCoin([FromBody]eCoinType coinType, [FromBody]int count = 1)
- {
-
- this.coinJar.AddCoin(coinType, count);
- }
-
-
- public class CoinJar
- {
- private readonly Coins[] coins = Enum.GetValues(typeof(eCoinType)).Cast().Select(t => new Coins(t)).ToArray();
-
-
- public CoinJar()
- {
-
- }
-
-
-
- void AddCoin(eCoinType coinType, int count = 1)
- {
- coins.First(t => t.CoinType == coinType).Amount += count;
- }
- }