andrepadez
Power Member
Só para confirmar: quando peço a posição de um objecto num array que não contenha esse objecto, o valor devolvido é (-1)?
Obrigado
Obrigado
@ http://msdn2.microsoft.com/en-us/library/5h020t0a.aspxMSDN disse:Return Value
Type: System..::.Int32
The index of the first occurrence of value within the range of elements in array that starts at startIndex and contains the number of elements specified in count, if found; otherwise, the lower bound of the array minus 1.
Since most arrays will have a lower bound of zero, this method would generally return –1 when value is not found. In the rare case that the lower bound of the array is equal to Int32..::.MinValue and value is not found, this method returns Int32..::.MaxValue, which is System.Int32.MinValue - 1.
Só para confirmar: quando peço a posição de um objecto num array que não contenha esse objecto, o valor devolvido é (-1)?
Obrigado