Share via


SignatureLineCollection.GetEnumerator Method

Gets a IEnumerator object that iterates over all entries in the SignatureLineCollection.

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

Syntax

'Declaration
Public MustOverride Function GetEnumerator As IEnumerator
'Usage
Dim instance As SignatureLineCollection
Dim returnValue As IEnumerator

returnValue = instance.GetEnumerator()
public abstract IEnumerator GetEnumerator()

Return Value

Type: System.Collections.IEnumerator
An enumerator for iterating over the entries in the collection.

Implements

IEnumerable.GetEnumerator()

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;
System.Collections.IEnumerator sigEnum =
   mySignatures.GetEnumerator();
while (sigEnum.MoveNext())
{
   MessageBox.Show(((SignatureLine)sigEnum.Current)
      .Signature.Comment.ToString());
}
Dim mySignatures As SignatureLineCollection = _
   Me.CurrentView.SignatureLines
Dim sigEnum As System.Collections.IEnumerator = _
   mySignatures.GetEnumerator()
While sigEnum.MoveNext()
   MessageBox.Show(DirectCast(sigEnum.Current, SignatureLine) _
      .Signature.Comment.ToString())
End While

See Also

Reference

SignatureLineCollection Class

SignatureLineCollection Members

Microsoft.Office.InfoPath Namespace