TX Text Control .NET Server

Add Method

Method|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Adds a new property to the dictionary.

Syntax

public void Add(string name, object value);

Parameters

ParameterDescription
name

Specifies the document property's name. The name is limited to 255 characters.

value

Specifies the document property's value. It can be of the type System.String, System.Boolean, System.Int32 or System.Double.

Examples

The following example adds review status metadata and assigns the dictionary to the document.

UserDefinedPropertyDictionary userDefinedPropertyDictionary = new();
userDefinedPropertyDictionary.Add("ReviewStatus", "Approved");
textControl.DocumentSettings.UserDefinedDocumentProperties = userDefinedPropertyDictionary;