Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a tool to export C# to HTML with syntax highlighting [closed]

I am looking for some way to export a .cs file to an .html file for posting on the web but my searches aren't helping much. I remember years ago an IDE called DevC++ could do this for C code, but I'm not sure how I'd do it with C# 4.

Can Visual Studio do this somehow?

like image 545
SilverDark Avatar asked May 28 '10 00:05

SilverDark


People also ask

What is export in C?

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.

What is DLL export?

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.

How do I export a class in C++?

You can export an entire C++ class by placing the __declspec(dllexport) before the class name, or you can export a single method by placing __declspec(dllexport) before the method name. Make class methods static and public. The C/C++ DLL Adapter does not allow you to call public non-static methods.


1 Answers

You can use Visual Studio Addins.

  • 2008: http://copysourceashtml.codeplex.com/
  • 2010: http://visualstudiogallery.msdn.microsoft.com/en-US/656f8df1-13ae-47b3-8f9a-89bf107c3b2a
like image 91
SLaks Avatar answered Oct 05 '22 23:10

SLaks