Items.Restrict.Count can't count?

  • Thread starter Thread starter Oz Kologlu
  • Start date Start date
O

Oz Kologlu

Hi all,

I'm trying to get a list of appointments for the following month using
restrict eg:

Items items = aptFolder.Items.Restrict(
"[My.Id] <> '' " +
"AND [Start] >= '" + DateTime.Now.ToShortDateString() + "' " +
"AND [Start] <= '" + DateTime.Now.AddMonths(1).ToShortDateString() + "'" +
"AND [MessageClass] = 'IPM.Appointment'");


items.Count returns 3 when there are only _2_ appointments!

It seems count is including some com object as the first item in the list.
Does anyone have any idea what it is or why I get an extra object and count
actually can't?

Thanks,
Oz
 
BTW, they are not recurring appointments so that should not be the problem.
I do have other appointments that shouldn't and don't get returned by the
filter.

Thanks
Oz
 
Back
Top