Could someone tell me how to print the code for the whole project? If possible with line # too. Thanks in advance.

Don't think it is possible from VS directly.
Why don't you make it a learning project for yourself!
Start coding in C# right away!

You can't print the whole project but that's understandable since it's possible that the project has a lot of stuff in it that can't (or shouldn't) be printed such as binary resources, designer files, etc. Although I agree, there probably should be a macro to print every source file.

You could always write a program to do it for you! Although getting the syntax highlighting right might be a pain in the ass.

Notepad++ can do the syntax highlighting for you but doesn't seem to have command line option for printing so it may take some work to use it autonomously.

You could always use something like AutoIt (or some other macro script) to select every source file and print it. I've never made a plugin for VS before but that's another route to get this working since you would have access to the project files and source code through the VS plugin SDK.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.