EventBindingService.ShowCode Method

Definition

Displays user code.

Overloads

ShowCode()

Displays user code.

ShowCode(Int32)

Displays the user code at the given line number.

ShowCode(IComponent, EventDescriptor, String)

Displays the user code for the specified method.

ShowCode()

Source:
EventBindingService.cs
Source:
EventBindingService.cs
Source:
EventBindingService.cs

Displays user code.

C#
protected abstract bool ShowCode();

Returns

true if it is possible to display the code; otherwise, false.

Remarks

The ShowCode method does not display any particular code; generally it displays the last code the user typed.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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.1, 5, 6, 7, 8, 9, 10

ShowCode(Int32)

Source:
EventBindingService.cs
Source:
EventBindingService.cs
Source:
EventBindingService.cs

Displays the user code at the given line number.

C#
protected abstract bool ShowCode(int lineNumber);

Parameters

lineNumber
Int32

The line number to show.

Returns

true if it is possible to display the code; otherwise, false.

Remarks

Line numbers are one-based.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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.1, 5, 6, 7, 8, 9, 10

ShowCode(IComponent, EventDescriptor, String)

Source:
EventBindingService.cs
Source:
EventBindingService.cs
Source:
EventBindingService.cs

Displays the user code for the specified method.

C#
protected abstract bool ShowCode(System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor e, string methodName);

Parameters

component
IComponent

The component to which the method is bound.

e
EventDescriptor

The EventDescriptor for the event handler.

methodName
String

The name of the method for which to display code.

Returns

true if it is possible to display the code; otherwise, false.

Remarks

The ShowCode method displays the body of the user code with the given method name.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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.1, 5, 6, 7, 8, 9, 10