Tim wrote:
>
Dim Animals as String() = {"cat", "dog", "mouse", "rat"}
Can the Exists or Find method be used to determine if the Animals array
contains "mouse" ?
If Animals.Exists(....
or
Animals.Find(...
The methods can be used for that, but not that way. The Exists and Find
method are static, so it would be:
found = Array.Exists(Animals, ... )
and
animal = Array.Find(Animals, ... )
I get a compiler error: Type argument inferred from the argument passed
to parameter 'match'conflicts with the type argument inferred from the
argument passed to parameter 'array'.
That means that the type of the array doesn't match the argument in your
predicate. If you show a bit of the code, someone might be able to help
you with it.
--
Göran Andersson
_____
http://www.guffa.com