Share via


SignatureLineCollection.Item property

Gets a reference to the specified SignatureLine object from the SignatureLineCollection.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Default Property Item ( _
    index As Integer _
) As SignatureLine
    Get
'Usage
Dim instance As SignatureLineCollection
Dim index As Integer
Dim value As SignatureLine

value = instance(index)
public abstract SignatureLine this[
    int index
] { get; }

Parameters

  • index
    Type: System.Int32

    The zero-based index for the SignatureLine object to return. The value specified must be a number from 0 to the value of the collection's Count property minus 1.

Property value

Type: Microsoft.Office.InfoPath.SignatureLine
An object that represents a Signature Line control in the collection.

Exceptions

Exception Condition
ArgumentNullException

The parameter passed to this method is a null reference (Nothing in Visual Basic).

ArgumentException

The parameter passed to this method is not valid. For example, it is of the wrong type or format.

Remarks

The order of the SignatureLine objects in the collection corresponds to the value of the Tab index property assigned to each control when you add it to the view.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Examples

The following code example iterates over the entire collection of SignatureLine objects and displays the value of the Comment property associated with each signature.

SignatureLineCollection mySignatures = 
   this.CurrentView.SignatureLines;
foreach (SignatureLine myLine in mySignatures)
{
   MessageBox.Show(myLine.Signature.Comment.ToString());
}
Dim mySignatures As SignatureLineCollection = _
   Me.CurrentView.SignatureLines
For Each myLine As SignatureLine In mySignatures
   MessageBox.Show(myLine.Signature.Comment.ToString())
Next

See also

Reference

SignatureLineCollection class

SignatureLineCollection members

Microsoft.Office.InfoPath namespace