title: Total days in last year
body: <p>I have label1 label2 and button1 where i push button1, label1 text will changed based on last month total days (lets say '31' days) and label2 text will changed base on last years total days (lets say '365' days)</p>
  
  <p>I only know how to coding last month total days which i use <strong>DateTime.DaysInMonth</strong> but there's no method for <strong>DateTime.DaysInYear</strong> isn't it</p>
  
  <p>here's my code</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      //Last Month
      string month = DateTime.Now.ToString("MM");
      int months = Int32.Parse(month);
      int previousmonths = months - 1;
  
      //Month in this Year
      string year = DateTime.Now.ToString("yyyy");
      int years = Int32.Parse(year);
      int daysmonth = DateTime.DaysInMonth(years, previousmonths);
      MessageBox.Show(daysmonth.ToString());
  
      //Last Year
      string year = DateTime.Now.ToString("yyyy");
      int years = Int32.Parse(year);
      int lastyears = years - 1;
      int daysyear = DateTime.DaysInYear(lastyears);
      MessageBox.Show(daysyear.ToString());
  }
  </code></pre>