Windows event log seems to support named data entries in event log events. However I cannot find how to write these events with .NET.
Example of such entries:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Security />
</System>
<EventData>
<Data Name="SubjectUserSid">S-1-5-18</Data>
<Data Name="SubjectUserName">DAVE-PC$</Data>
</EventData>
</Event>
Is there any way to do this from BCL? Or only PInvoke?