Spread Windows Forms 11.0 Product Documentation
IndexOf Method (DefaultStyleCollection)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > DefaultStyleCollection Class : IndexOf Method
NamedStyle object for which to search
Returns the index of the specified NamedStyle object.
Syntax
'Declaration
 
Public Function IndexOf( _
   ByVal style As NamedStyle _
) As Integer
'Usage
 
Dim instance As DefaultStyleCollection
Dim style As NamedStyle
Dim value As Integer
 
value = instance.IndexOf(style)
public int IndexOf( 
   NamedStyle style
)

Parameters

style
NamedStyle object for which to search

Return Value

Zero-based Integer index of the object in the collection, or -1 if the object was not found
Example
This example illustrates the use of this member by returning the index of the specified NamedStyle.
FarPoint.Win.Spread.DefaultStyleCollection dsc = new FarPoint.Win.Spread.DefaultStyleCollection();
foreach(FarPoint.Win.Spread.NamedStyle ns in FarPoint.Win.Spread.DefaultStyleCollection.Styles)
{
listBox1.Items.Add(dsc.IndexOf(ns));
}
Dim dsc As New FarPoint.Win.Spread.DefaultStyleCollection()
Dim ns As FarPoint.Win.Spread.NamedStyle
For Each ns In dsc.Styles
ListBox1.Items.Add(dsc.IndexOf(ns))
Next
See Also

Reference

DefaultStyleCollection Class
DefaultStyleCollection Members