Search code examples
c#loggingtrace

C# simplest trace or log


What is the simplest way to do a trace or log in C# windows form application?

Doesn't have to save to file, can be showing at runtime. What would be the simplest thing to implement?

thanks


Solution

  • You can try using one of the following methods:

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