Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is there a similar function for VB.NET as

 

in PHP :

 

array_key_exists -- Checks if the given key or index exists in the array. return true or false.

 

 

<?php

$search_array = array("first" => 1, "second" => 4);

if (array_key_exists("first", $search_array)) {

echo "The 'first' element is in the array";

}

?>

 

 

if there isnt could you please write me one :D

"Everything should be made as simple as possible, but not simpler."

"It's not that I'm so smart , it's just that I stay with problems longer ."

- Albert Einstein

Posted
is it like if array.indexOf is empty then it didnt find the requested e.g. number or string... and its false.. ?

"Everything should be made as simple as possible, but not simpler."

"It's not that I'm so smart , it's just that I stay with problems longer ."

- Albert Einstein

Posted (edited)
Use the ArrayList Object.

It has a .contains method.

 

(I think)

 

 

how do I make a normal array to ArrayList object and search inside it for a specific integer huh ?

Edited by DR00ME

"Everything should be made as simple as possible, but not simpler."

"It's not that I'm so smart , it's just that I stay with problems longer ."

- Albert Einstein

Posted (edited)

B(50) as byte

 

lblPixelClr.Text = CStr(Array.IndexOf(B, 240))

 

 

the problem is that B is not an Array... well it is ..but its type is not array... so that thing is not working...

 

 

so is there way to convert byte array to array ? huh... or what is the difference between:

 

B(50) as Byte

 

B(50) as Array

 

But both are arrays right ? im confused... someone lighten me please!

Edited by DR00ME

"Everything should be made as simple as possible, but not simpler."

"It's not that I'm so smart , it's just that I stay with problems longer ."

- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...