get_VariableName method

The get_VariableName method gets the name of an indexed variable from the SetupNode object. You can use this method to identify objects (for example, pages) that require special processing when a variable contains a specific value. This method is useful when a node contains many child objects and variables.

Attention: .NET only. For VBScript, use the VariableName property instead.

Description

The following example shows three variables that are associated with the page node Main_Page in the Setup DCO file:
<P type="Main_Page">
   <V n="ID">0</V>             0 
   <V n="TYPE">Page</V>        1 
   <V n="STATUS">0</V>         2  

 0  Variable 0 (name = ID, value = 0)

 1  Variable 1 (name = TYPE, value = Page)

 2  Variable 2 (name = STATUS, value = 0)

Syntax

C#
string get_VariableName(int nIndex)

Arguments

nIndex
The index of the variable, where 0 is the first variable that is defined in the SetupNode object

C# Example

The following example gets the name of the first variable that is defined within the page node, Main_Page, in the Setup DCO.
TDCOLib.DCOSetupNode m_oDCOSetupNode = m_oDCOSetup.GetNodeByName(2, "Main_Page");
string varName = m_oDCOSetupNode.get_VariableName(0);