IUIService.ShowError Method

Definition

Displays the specified error message in a message box.

Overloads

ShowError(Exception)

Displays the specified exception and information about the exception in a message box.

ShowError(String)

Displays the specified error message in a message box.

ShowError(Exception, String)

Displays the specified exception and information about the exception in a message box.

ShowError(Exception)

Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs

Displays the specified exception and information about the exception in a message box.

C#
public void ShowError(Exception ex);

Parameters

ex
Exception

The Exception to display.

Remarks

Using this method enables the message box display to be properly integrated with the development environment.

Applies to

.NET Framework 4.8.1 ve diğer sürümler
Ürün Sürümler
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ShowError(String)

Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs

Displays the specified error message in a message box.

C#
public void ShowError(string message);

Parameters

message
String

The error message to display.

Remarks

Using this method enables the message box display to be properly integrated with the development environment.

Applies to

.NET Framework 4.8.1 ve diğer sürümler
Ürün Sürümler
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ShowError(Exception, String)

Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs

Displays the specified exception and information about the exception in a message box.

C#
public void ShowError(Exception ex, string message);

Parameters

ex
Exception

The Exception to display.

message
String

A message to display that provides information about the exception.

Examples

The following code example attempts to obtain an instance of the IUIService and invoke the service's ShowError method.

C#
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowError( new Exception(
        "This is a message in a test exception, " + 
        "displayed by the IUIService", 
         new ArgumentException("Test inner exception")));

Remarks

Using this method enables the message box display to be properly integrated with the development environment.

Applies to

.NET Framework 4.8.1 ve diğer sürümler
Ürün Sürümler
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10