FieldBuilder

Overview

FieldBuilder is a class in Aspose.Words FOSS for .NET. Inherits from: IFieldBuildingBlock.

Builds a field from field code tokens (arguments and switches).

This class provides 12 methods for working with FieldBuilder objects in .NET programs. Available methods include: AddArgument, AddSwitch, BuildAndInsert, FieldBuilder. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package.

Methods

SignatureDescription
FieldBuilder(fieldType: FieldType)Initializes an instance of the FieldBuilder class.
AddArgument(argument: string)Adds a field’s argument.
AddArgument(argument: int)Adds a field’s argument.
AddArgument(argument: double)Adds a field’s argument.
AddArgument(argument: FieldBuilder)Adds a child field represented by another FieldBuilder to the field’s code.
AddArgument(argument: FieldArgumentBuilder)Adds a field’s argument represented by FieldArgumentBuilder to the field’s code.
AddSwitch(switchName: string)Adds a field’s switch.
AddSwitch(switchName: string, switchArgument: string)Adds a field’s switch.
AddSwitch(switchName: string, switchArgument: int)Adds a field’s switch.
AddSwitch(switchName: string, switchArgument: double)Adds a field’s switch.
BuildAndInsert(refNode: Inline)Builds and inserts a field into the document before the specified inline node.
BuildAndInsert(refNode: Paragraph)Builds and inserts a field into the document to the end of the specified paragraph.

See Also