I receive an "IOException" when assigning "Console.Title"


I have the error that I put capture below, in synthesis the error is in that an exception occurred with the file mscorlib.dll and no additional information.

I must say I have another project from the university and it runs it as normal, recreating the same code or just the Console.Title gives me an error. What should it be?

asked by Alexander Tejada 13.04.2017 в 05:54

1 answer


The fact that you receive a IOException when trying to manipulate the object Console usually indicates that your program simply does not have a console. And the most likely reason why this happens is because your project is not Console Application .

To verify this, open the properties of your project, and check the selected value for Output Type . If the value is not Console Application (maybe you have it to Windows Application or something like that), change it so that it is. This should correct your error.

answered by 14.04.2017 в 05:10