ICSEptContentItem Property Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Gets or sets the value of a field with the specified name.

Namespace: ContentStudio.EventActions
Assembly: CS5Interfaces (in CS5Interfaces.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

string this[
	string name
] { get; set; }

Parameters

name
Type: SystemString
The name of the field to get or set.

Property Value

Type: String
the field with the specified name
Exceptions

ExceptionCondition
ArgumentNullException Either the name or value are null.
KeyNotFoundException The property is retrieved and name is not an existing field.
Remarks

This property provides the ability to access a specific element in the collection by using the following syntax: eptFieldCollection[name] (eptFieldCollection(name) in Visual Basic).

You can also use the ItemString property to add new elements by setting the value of a key that does not exist in the dictionary; for example,

eptFieldCollection["theNewFieldName"]
= myValue in C#
eptFieldCollection("theNewFieldName")
= myValue in Visual Basic). However, if the specified key already exists in the field collection, setting the ItemString property overwrites the old value. In contrast, the AddField(String, String) method does not modify existing elements.

If you like to set a value to a field only if it exists you can use the TrySetValue(String, String) method instead.

See Also

Reference