HtmlElementErrorEventArgs.Description Özellik

Tanım

Hataya karşılık gelen açıklayıcı dizeyi alır.

public:
 property System::String ^ Description { System::String ^ get(); };
public string Description { get; }
member this.Description : string
Public ReadOnly Property Description As String

Özellik Değeri

Hataya karşılık gelen açıklayıcı dize.

Örnekler

Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir. Örnekte, olay işleyicisi olayın oluşumunu HtmlWindow.Error raporlar. Bu rapor, olayın ne zaman gerçekleştiğini öğrenmenize yardımcı olur ve hata ayıklamada size yardımcı olabilir. Birden çok olayı veya sık gerçekleşen olayları raporlamak için, iletisini ile Console.WriteLine değiştirmeyi MessageBox.Show veya iletiyi çok satırlı TextBoxbir iletiye eklemeyi göz önünde bulundurun.

Örnek kodu çalıştırmak için, adlı HtmlWindow1bir tür HtmlWindow örneği içeren bir projeye yapıştırın. Ardından olay işleyicisinin olayla ilişkilendirildiğinden HtmlWindow.Error emin olun.

private void HtmlWindow1_Error(Object sender, HtmlElementErrorEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Description", e.Description );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Handled", e.Handled );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "LineNumber", e.LineNumber );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Url", e.Url );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "Error Event" );
}
Private Sub HtmlWindow1_Error(sender as Object, e as HtmlElementErrorEventArgs) _ 
     Handles HtmlWindow1.Error

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Description", e.Description)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Handled", e.Handled)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "LineNumber", e.LineNumber)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Url", e.Url)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"Error Event")

End Sub

Şunlara uygulanır