Provides source code syntax highlighting functionality.
Inheritance Hierarchy
Ookii.FormatC CodeFormatter
Namespace: Ookii.FormatC
Assembly: Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
Remarks
The CodeFormatter class will format source code based on the information provided by an implementation of the IFormattingInfo interface.
The result will be HTML source code that will display the formatted source code when combined with the appropriate style sheet.
Examples
The following code sample shows how to use the CodeFormatter class to format C# source code.
CodeFormatter formatter = new CodeFormatter(); formatter.FormattingInfo = new CSharpFormattingInfo(); string formattedHtml = formatter.FormatCode(System.IO.File.ReadAllText("MySourceFile.cs"));
Thread Safety
See Also