Errors.Count 속성
컬렉션에 포함된 ErrorObject 개체의 수를 가져옵니다.
이 속성은 CLS 규격이 아닙니다.
네임스페이스: Microsoft.Office.Interop.InfoPath.SemiTrust
어셈블리: Microsoft.Office.Interop.InfoPath.SemiTrust(microsoft.office.interop.infopath.semitrust.dll)
구문
<DispIdAttribute(1)> _
ReadOnly Property Count As Integer
Dim instance As Errors
Dim value As Integer
value = instance.Count
[DispIdAttribute(1)]
int Count { get; }
주의
![]() |
---|
이 멤버는 무제한 액세스할 수 있습니다. |
예제
다음 예제에서는 Count 속성을 사용하여 Error 개체의 컬렉션 전체를 반복하고 각 오류의 간단한 오류 메시지를 나타내는 메시지 상자를 표시합니다.
for (int i=0; i < thisXDocument.Errors.Count; i++)
{
thisXDocument.UI.Alert("Error message: " + thisXDocument.Errors[i].ShortErrorMessage);
}
참고 항목
참조
Errors 인터페이스
Errors 구성원
Microsoft.Office.Interop.InfoPath.SemiTrust 네임스페이스