ControlChar Class
Control characters often encountered in documents.
Inheritance Hierarchy
SystemObject
  Aspose.WordsControlChar

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
Syntax
public static class ControlChar

The ControlChar type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberCode exampleCell
End of a table cell or end of a table row character: "\x0007" or "\a".
Public fieldStatic memberCode exampleCellChar
End of a table cell or end of a table row character: (char)7 or "\a".
Public fieldStatic memberCode exampleColumnBreak
End of column character: "\x000e".
Public fieldStatic memberCode exampleColumnBreakChar
End of column character: (char)14.
Public fieldStatic memberCode exampleCr
Carriage return character: "\x000d" or "\r". Same as ParagraphBreak.
Public fieldStatic memberCode exampleCrLf
Carriage return followed by line feed character: "\x000d\x000a" or "\r\n". Not used as such in Microsoft Word documents, but commonly used in text files for paragraph breaks.
Public fieldStatic memberCode exampleDefaultTextInputChar
This is the "o" character used as a default value in text input form fields.
Public fieldStatic memberCode exampleFieldEndChar
End of MS Word field character: (char)21.
Public fieldStatic memberCode exampleFieldSeparatorChar
Field separator character separates field code from field value. Optional in some fields. Value: (char)20.
Public fieldStatic memberCode exampleFieldStartChar
Start of MS Word field character: (char)19.
Public fieldStatic memberCode exampleLf
Line feed character: "\x000a" or "\n". Same as LineFeed.
Public fieldStatic memberCode exampleLineBreak
Line break character: "\x000b" or "\v".
Public fieldStatic memberCode exampleLineBreakChar
Line break character: (char)11 or "\v".
Public fieldStatic memberCode exampleLineFeed
Line feed character: "\x000a" or "\n". Same as Lf.
Public fieldStatic memberCode exampleLineFeedChar
Line feed character: (char)10 or "\n".
Public fieldStatic memberCode exampleNonBreakingHyphenChar
Nonbreaking Hyphen in Microsoft Word is (char)30.
Public fieldStatic memberCode exampleNonBreakingSpace
Non-breaking space character: "\x00a0".
Public fieldStatic memberCode exampleNonBreakingSpaceChar
Non-breaking space character: (char)160.
Public fieldStatic memberCode exampleOptionalHyphenChar
Optional Hyphen in Microsoft Word is (char)31.
Public fieldStatic memberCode examplePageBreak
Page break character: "\x000c" or "\f". Note it has the same value as SectionBreak.
Public fieldStatic memberCode examplePageBreakChar
Page break character: (char)12 or "\f".
Public fieldStatic memberCode exampleParagraphBreak
End of paragraph character: "\x000d" or "\r". Same as Cr
Public fieldStatic memberCode exampleParagraphBreakChar
End of paragraph character: (char)13 or "\r".
Public fieldStatic memberCode exampleSectionBreak
End of section character: "\x000c" or "\f". Note it has the same value as PageBreak.
Public fieldStatic memberCode exampleSectionBreakChar
End of section character: (char)12 or "\f".
Public fieldStatic memberCode exampleSpaceChar
Space character: (char)32.
Public fieldStatic memberCode exampleTab
Tab character: "\x0009" or "\t".
Public fieldStatic memberCode exampleTabChar
Tab character: (char)9 or "\t".
Remarks
Provides both char and string versions of the same constants. For example: string ControlChar.LineBreak and char ControlChar.LineBreakChar have the same value.
Examples
Shows how to use control characters.
// Replace "\r" control character with "\r\n"
text = text.Replace(ControlChar.Cr, ControlChar.CrLf);
See Also