Is it possible to output values to the console from within a class library?
For example
Console App -> calls method in -> assembly > function
Is it possible to write a console.out method in the function of the assembly?
I know in web its possible to get the httpcontext, and do a response.write.
Yup,
Console.WriteLineetc will work just fine in a class library… but there’s no guarantee that anything is listening to the console. If you use it from a WinForms app or a web app, that output may well go absolutely nowhere…Have you thought of using a logging library such as log4net instead?