C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,053 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello All,
We have a WPF application built on .Net Framework 4.8. This application writes certain logs into the Event Viewer under the path 'Windows Logs/ Application'.
Currently, the logs are written into the 'Event Viewer', but the process id is displayed as 0.
We are using the code attached in the question for writing logs into the 'Event Viewer'EventViewer_Code.txt.
Can anyone please help us to get the actual process ID in the Event Viewer instead of 0?
Any help is appreciated!
Thank you in advance!!