현재 Outlook에서 작업 중이며 항목 목록을 반복합니다.목록/컬렉션에서 특정 유형의 마지막 항목을 가져 오는 방법은 무엇입니까?
문제점 : 현재 항목이 마지막 항목 인 경우 foreach-loop에서 물어보고 싶지만 이런 종류의 문제는 해결할 수 없습니다. 나는이 프로그램을 실행하면
lastAppointmentItem = myAppointmentItems.GetLast();
foreach (Outlook.AppointmentItem myItem in myAppointmentItems)
{
// Types
// myAppointmentItems = Outlook.Items
// myItem = Outlook.AppointmentItem
if(myItem.Equals(lastAppointmentItem)) { do_something(); }
}
내가 그래서
System.Runtime.InteropServices.COMException:
// The last element of the list cannot be called
을 얼마나 내 문제를 해결할 수 있습니다 - 너희들이 알고 :
이 내 코드?
미리 감사드립니다.
인사말.