|
-
May 13th, 2002, 01:37 AM
#1
find an element in array?
Is there a function that searches for a string in an array of strings and returns the index of the element? like instr but for arrays
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 13th, 2002, 02:35 AM
#2
How about Array.IndexOf? This will show "4" in a message box:
Code:
Dim StringArray() As String = {"zero", "one", "two", "three", "four", "five", "six"}
MsgBox(Array.IndexOf(StringArray, "four"))
-
May 13th, 2002, 02:38 AM
#3
tnx
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 13th, 2002, 05:12 PM
#4
actually, it doesnt work for what I want. For example if I have a string array and I want to search for a partial search it wont work, it only looks for an exact match
so do I have to write my own func if I want to do a paritial search?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Feb 18th, 2003, 08:06 PM
#5
Member
Mr. Polite,
Did you ever figure out how to do this?
Eagle Eye
"Programming is easy ... when you are done."
-
Feb 19th, 2003, 04:26 PM
#6
Lively Member
Dim StringArray() As String = {"zero", "one", "two", "three", "four", "five", "six"}
MsgBox(StringArray.contains("four"))
Can't test this cause I'm not at a dev box, but that will work for a combobox so it should work for a array.
let me know if I'm right.
-Thankx
-
Feb 19th, 2003, 04:48 PM
#7
Member
Originally posted by Evad
Dim StringArray() As String = {"zero", "one", "two", "three", "four", "five", "six"}
MsgBox(StringArray.contains("four"))
Can't test this cause I'm not at a dev box, but that will work for a combobox so it should work for a array.
let me know if I'm right.
-Thankx
Array does not have such property contains.
What is that?
-
Feb 19th, 2003, 05:04 PM
#8
Sleep mode
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|