title: Type does not contain definition of 'Round' and 'Parse'
body: <p>I get this strange error and it doesn't compile. My code looks like this:</p>
  
  <pre><code> if (model.CreditType == "Extra")
      {
      decimal num1 = decimal.Parse(amountReturn.ToString()) / model.CreditPeriod;
     ((dynamic)base.ViewBag).MonthlyPayment = Math.Round(num1, 2, 
     MidpointRounding.AwayFromZero);
     dynamic viewBag = base.ViewBag;
     Type type = typeof(Math);
     decimal num2 = num1;
     Type type1 = typeof(decimal);
     viewBag.MonthlyPaymentWithTax = type.Round(num2 + 
     type1.Parse(((dynamic)base.ViewBag).TaxToAdd.ToString()) / 
     model.CreditPeriod, 2, 1);
     }
  </code></pre>
  
  <p>I will be very thankful if somebody explains me how to fix my problem. On compile it generates the following errors.</p>
  
  <p>Thank you in advance!</p>
  
  <p><a href="https://i.stack.imgur.com/ydNxl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ydNxl.jpg" alt="compilation errors"></a></p>