ToolWindows.ErrorList Özellik

Tanım

IDE 'de görüntülenen hataların listesini alır.

public:
 property EnvDTE80::ErrorList ^ ErrorList { EnvDTE80::ErrorList ^ get(); };
public:
 property EnvDTE80::ErrorList ^ ErrorList { EnvDTE80::ErrorList ^ get(); };
[System.Runtime.InteropServices.DispId(10)]
public EnvDTE80.ErrorList ErrorList { [System.Runtime.InteropServices.DispId(10)] get; }
[<System.Runtime.InteropServices.DispId(10)>]
[<get: System.Runtime.InteropServices.DispId(10)>]
member this.ErrorList : EnvDTE80.ErrorList
Public ReadOnly Property ErrorList As ErrorList

Özellik Değeri

ErrorList

Bireysel hatalar için Numaralandırılabilir bir hata listesi.

Öznitelikler

Örnekler

Bu örnek, hata listesi penceresini açar ve varsa hataları bir ileti kutusunda görüntüler. Bu örneği çalıştırmadan önce, içinde bazı hatalarla bir proje oluşturun.

Imports EnvDTE  
Imports EnvDTE80  
Public Sub GetErrorList(ByVal dte As DTE2)  
    Dim myErrors As ErrorList  
    Dim count As Integer  
    Dim aString As String  
    aString = ""  
    _applicationObject.ExecuteCommand("View.ErrorList", " ")  
    myErrors = _applicationObject.ToolWindows.ErrorList  
    count = myErrors.ErrorItems.Count  
    If count <> 0 Then  
        For k As Integer = 1 To count  
            aString &= _  
           (myErrors.ErrorItems.Item(k).Description.ToString() & vbCr)  
        Next k  
        MsgBox(aString)  
    Else  
         MsgBox("There are no items in the error list.")  
    End If  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void GetErrorList(DTE2 dte)  
{  
    ErrorList myErrors;  
    int count;  
    String aString = null;  
    _applicationObject.ExecuteCommand("View.ErrorList", " ");  
    myErrors = _applicationObject.ToolWindows.ErrorList;  
    count = myErrors.ErrorItems.Count;  
    if (count != 0)  
    {  
        for (int i = 1; i <= count; i++)  
        {  
            aString +=  
(myErrors.ErrorItems.Item(i).Description.ToString() + "\n");  
        }  
        MessageBox.Show(aString);  
    }  
    else  
    {  
        MessageBox.Show("There are no items in the error list.");  
    }  
}  

Şunlara uygulanır