VariableCollection.VarType Method

This method returns the type of variable at the specified index.

Syntax

public HotDocs.Server.InteSrop.ansType VarType ( int index )

Parameter Description
int index The position of the variable in the VariableCollection.

Return Value

The type of variable at the specified index.

Example

The following C# sample code displays information about the VariableCollection:

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Server.VariableCollection hvc = new HotDocs.Server.VariableCollection("C:\\Templates\\MyFile.hvc");
        System.Console.WriteLine("VARIABLECOLLECTION OBJECT: --------------------------------------");
        System.Console.WriteLine(" {0}: {1}","Count", hvc.Count);
        System.Console.WriteLine(" {0}: {1}","Description", hvc.Description);
        System.Console.WriteLine(" {0}: {1}","Title", hvc.Title);
        for (int i=0;i<hvc.Count;i++)
            System.Console.WriteLine(" {0}: {1} ({2})",hvc.VarType(i).ToString(), hvc.VarName(i),hvc.VarEncodedName(i));
        hvc.Dispose();
    }
}