Réponse acceptée !
Salut,
int cnt = this.listBox1.Items.Count;
List< int > list = new List< int >( );
for ( int i = 0; i < cnt; i++ )
{
if ( ( string )this.listBox1.Items[ i ] == "ST" )
list.Add( i );
}
// Ou ça..
int index = -1;
List< int > list = new List< int >( );
do
{
index = this.listBox1.FindStringExact( "ST", index );
if ( !list.Contains( index ) )
list.Add( index );
else
break;
} while ( index != ListBox.NoMatches );