Gets the name of the user responsible for this event.
[Visual Basic] Public ReadOnly Property UserName As String [C#] public string UserName {get;} [C++] public: __property String* get_UserName(); [JScript] public function get UserName() : String;
The security identifier (SID) that uniquely identifies a user or group.
Exception Type | Condition |
---|---|
SystemException | Account information could not be obtained for the user's SID. |
This property is often blank for events in logs other than the Security log.
EventLogEntry Class | EventLogEntry Members | System.Diagnostics Namespace