Version

IndexOf(Field) Method

Gets the index of the FieldSortDescription for the specified field.
Syntax
'Declaration
 
Public Overloads Function IndexOf( _
   ByVal field As Field _
) As Integer
public int IndexOf( 
   Field field
)

Parameters

field
The associated field

Return Value

The zero-based index or -1 if the field is not found
Remarks

Note: the collection can now contain up to 2 instances of FieldSortDescriptions with the same field (one with its IsGroupBy set to true and the other with its IsGroupBy set to false). This method will return the index of the first instance that matches the field. In the case where there are 2 instances it will always return the index of the one with its IsGroupBy set to true. This is because the collection is sorted such that all 'groupby' FieldSortDescriptions come before all 'non-groupby' ones.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also