ArrayList vArrayList = new ArrayList ();
Random vRandom = new Random ();
for ( int i = 0 ; i < 100 ; i ++ )
vArrayList . Add(vRandom . Next( 100 ));
for ( int i = vArrayList . Count - 1 ; i >= 0 ; i -- )
if (vArrayList . IndexOf(vArrayList[i]) != i)
vArrayList . RemoveAt(i);
vArrayList . Sort();
for ( int i = 0 ; i < vArrayList . Count; i ++ )
listBox1 . Items . Add(vArrayList[i]);