Click here to Skip to main content
15,915,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, i have a little question.

I usally use the console.write to make some tests, i generraly forget to remove them later.

When the application is generated, did visual studio get rid of them automatcally or not?

I think it may have a big hit in performance... at least in some cases

Thanks
Posted

No, they are not removed.
Instead, use the Debug class[^]
C#
Debug.WriteLine("Hello");
This is always written to the VS Output pane (so it doesn't mess up Console apps either) and the code is removed in Release builds.
 
Share this answer
 
Not at all, Visual studio not remove them automatically. because its a method of console to write some output text over console, so vs will not remove them automatically, you need to manually remove them.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900