Results 1 to 6 of 6

Thread: [RESOLVED] [1.0/1.1] finding value from array

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Resolved [RESOLVED] [1.0/1.1] finding value from array

    Hi ,
    How to find value inside the array with out using a loop?

    thanks,
    Popskie

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [1.0/1.1] finding value from array

    Would you please explain more?

    If you want to find a value inside an array you can use Array[Index];
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [1.0/1.1] finding value from array

    Are you looking for Array.IndexOf() ?

  4. #4

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Re: [1.0/1.1] finding value from array

    Sorry
    Ex.
    VB Code:
    1. String[] test = {"A","B","C","M","Z"}

    this the scenario, if i pass A or B or C or Z
    it return true or 1
    but if i pass Q it return false or 0
    if i pass W it return false or 0
    if i pass X it return false or 0

    I hope I make my self clear at this time.


    Thank,

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [1.0/1.1] finding value from array

    Array.IndexOf(test, "A") >= 0

  6. #6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width