I have an external DLL whose source code is C#. From the documentation for the DLL, I determined that it writes its debug messages to the console using Console.WriteLine.
I’d like to use this DLL within a WinForms application. However, what I have discovered is that I cannot see the debug messages emitted by the DLL since a WinForms application does not have a console.
is there a way to capture those debug messages, perhaps even to a simple log file? Of course, using ProcessInfo.RedirectStandartOutput will not work as I do not use the DLL as a process.
Call Console.SetOut with a TextWriter you control (e.g. a StringWriter).