title: How can I get total number of days in selected month with/without the weekends in WPF?
body: <p>I am hoping to find a way to get the total number of days in a month with and without the weekends using LINQ in my ViewModel. For example, September would count for 20 days without weekends and 30 days with the weekends. </p>
  
  <p>I also have a datepicker binding to MDate and I have no idea were to start.</p>
  
  <p>Can someone please suggest an easy method? I am just an amateur.</p>
  
  <pre><code>private DateTime _mDate = DateTime.Now;
  
  public DateTime MDate
  {
  
      get { return _mDate; }
      set
      {
          if (value == _mDate)
          {
              return;
          }  
          else
          {
              _mDate = value;
              OnPropertyChanged("MDate");
              SetDaysInMonth();
          }
  
      }
  
  }
  
  private void SetDaysInMonth()
          {
              ???
          }
  </code></pre>
  
  <p>Thank you.</p>