Items.Restrict.Count can't count?

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
 
O

Oz Kologlu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top