TX Text Control .NET Server

Contains 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

Determines whether the dictionary contains a property with the specified name.

Syntax

public bool Contains(string name);

Parameters

ParameterDescription
name

Specifies a document property's name.

Examples

The following example checks for a review status before reading it.

UserDefinedPropertyDictionary properties = new();
properties.Add("ReviewStatus", "Approved");
properties.Add("Department", "Finance");
if (properties.Contains("ReviewStatus"))
{
    Console.WriteLine($"Review status: {properties["ReviewStatus"]}");
}