Search code examples
c#winformsconsole-application

What is the Purpose of Console.WriteLine() in Winforms


I once saw the source code of a winform application and the code had a Console.WriteLine();. I asked the reason for that and i was told that it was for debugging purposes.

Pls what is the essence of Console.WriteLine(); in a winform and what action does it perform because when i tried using it, it never wrote anything.


Solution

  • It writes to the Console.

    The end user won't see it, and to be honest its much cleaner to put it into a proper log, but if you run it through VS the Console window will populate.