Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EventSource::Write<T> Method (String^, EventSourceOptions, T)

.NET Framework (current version)
 

Writes an event with the specified name, event data and options.

Namespace:   System.Diagnostics.Tracing
Assembly:  mscorlib (in mscorlib.dll)

public:
generic<typename T>
void Write(
	String^ eventName,
	EventSourceOptions options,
	T data
)

Parameters

eventName
Type: System::String^

The name of the event.

options
Type: System.Diagnostics.Tracing::EventSourceOptions

The event options.

data
Type: T

The event data. This type must be an anonymous type or marked with the EventDataAttribute attribute.

Type Parameters

T

The type that defines the event and its associated data. This type must be an anonymous type or marked with the EventSourceAttribute attribute.

If eventName is null, the event name is automatically derived from the type T’s event data (Name) or determined based on the name of type T. The public instance properties of data will be written recursively to create the event fields.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.6
Return to top
Show:
© 2017 Microsoft