C # simplest trace or log

What is the easiest way to trace or log into a C # Windows forms application?

No need to save to a file; it may be displayed at runtime. What will be the easiest to implement?

thanks

+6
source share
4 answers

System.Diagnostics.Trace.WriteLine("Something") or System.Diagnostics.Debug.WriteLine("Something")

+7
source

You can check the Trace class.

+3
source

System.Diagnostics.Trace

The output is configured in the configuration file.

+2
source

You can use the Trace class and add a trace listener to save it to a file.

Also consider the Debug class.

+1
source

Source: https://habr.com/ru/post/901295/


All Articles