I was wondering if there is any export function inside Visual Studio Ultimate (2010)
to get a chosen tab
(by default a single class
) of C# code
exported into a PDF
file, so you can share that PDF file and show someone the code, with the formatting and colors of Visual Studio? I'm sending the PDF with sample code for an application, that's how I came to this question.
I know that I could copy the code into Word in a textbox, that works fine and keeps colors + formatting. I am just interested if there is an option in Visual Studio too? It's not important, just want to know. ;-)
Exporting is relative to that process. In C/C++ if you want to declare a function to use it without defining it in a source file, you should use the keyword "extern". In the file where that function is defined you have nothing special to make, by defaults things at global scope are automatically exported.
__declspec(dllimport) is a storage-class specifier that tells the compiler that a function or object or data type is defined in an external DLL. The function or object or data type is exported from a DLL with a corresponding __declspec(dllexport) .
The dllexport and dllimport storage-class attributes are Microsoft-specific extensions to the C and C++ languages. You can use them to export and import functions, data, and objects to or from a DLL.
This is a job for CutePDF. Just install it, and go to file->print in Visual Studio.
I wanted to do this myself so google brought me here. Then I had a mini brainwave and remembered "Microsoft Print to PDF" which is built in as an option in the print menu. I tried it and it worked!
So just go File->Print, then choose Microsoft Print to PDF
as the printer, then choose where to save your printout.
(P.s. my code is awful. This file is from an old app I wrote lazily and intend to overhaul)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With