Click here to Skip to main content
15,878,814 members
Articles / Programming Languages / C#
Tip/Trick

VS2017: What to do to get Console.Writexxxx working

Rate me:
Please Sign up or sign in to vote.
4.94/5 (10 votes)
23 Mar 2017CPOL 14.8K   4   1
A hack so you can use Console.Write and Console.WriteLine in VS2017 WinForm programminfg

Did you notice that in VS 2017 your Console.Write and Console.WriteLine do not write anything to VS's 'Output Window ? Here's a fix.

You'll have to ask MS why this new "feature" has been spring on us, but, meanwhile, you can add this to your 'using directives

C#
using Console = System.Diagnostics.Debug;

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer
Thailand Thailand
Human being, mortal, flawed.

Comments and Discussions

 
GeneralMy vote of 5 Pin
Jochen Arndt23-Mar-17 3:18
professionalJochen Arndt23-Mar-17 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.