CSharpFormattingInfo ClassFormatC Syntax Highlighting Class Library
Provides formatting info for C# code.
Inheritance Hierarchy

OnlineSystem Object
  Ookii.FormatC CSharpFormattingInfo

Namespace: Ookii.FormatC
Assembly: Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public class CSharpFormattingInfo : IFormattingInfo, 
	IFormattingInfoWithTypes
Remarks

C# contains several keywords that are contextual keywords. For example, from is a keyword in a Linq expression, but not elsewhere, and you can still have variables named from without prefixing them with @.

Because of the limitations of regular expressions, the CSharpFormattingInfo cannot determine when a contextual keyword should be treated as a keyword and when it should be treated as a regular identifier. Because of this, it always treats them as keywords.

You can prefix an identifier that is also a contextual keyword with ` (e.g. `from) to prevent it from being highlighted as a keyword. The ` character will not appear in the formatted output, and the identifier will not be highlighted.

You can specify identifiers that should be colored as type names using the Types property. These identifiers will then always be formatted as type names (even in contexts where they are not). Like with contextual keywords, you can prefix an identifier with ` to prevent it from being highlighted as a type name.

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
See Also