title: Days in a certain month
body: <p>I want to calculate how many days there are in a month. Obviously if there is a leap year then February would have 29 days.<br>
  I have some code that works out if it a leap year or not, but I do not know if it is useful.</p>
  
  <p>I tried to do the current year and to count the days of the month that is entered; however there's an error and I'm not sure what to do.  </p>
  
  <pre><code>Sub daysInMonth()
      Console.WriteLine("Please Enter month you will like to calculate number of days: ")
  
      Dim inputMonth As DateTime = Console.ReadLine()
      Dim newMonth = DateAndTime.Month(inputMonth)
      Dim current = Now()
      Dim currentYear = (Year(current))
      Dim febuaryLeapYear = System.DateTime.DaysInMonth(currentYear, newMonth)
  End Sub
  </code></pre>
  
  <p>Solved</p>