Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 28, 2012 08:47 AM by Mudasir.Khan
Member
6 Points
38 Posts
May 28, 2012 02:36 AM|LINK
Dim myCode as String Dim codeArray As String() = New String() {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10"}
How can i check myCode the user enter with the codeArray that i already set up by using if... else
All-Star
15346 Points
3142 Posts
May 28, 2012 03:00 AM|LINK
codeArrar.Contains(mycode) if it contains the it will return true else false may i request you to use integer instead of string as the values are integer but though you are using string codeArrar.Contains(mycode) will work
May 28, 2012 03:40 AM|LINK
hi mudasir khan
thanks for your suggestion.
can i ask you a question, is there any code for not contain array?
May 28, 2012 08:47 AM|LINK
no sorry, if the Contains return false then its considered to be not in array
shahrizar198...
Member
6 Points
38 Posts
How to use array
May 28, 2012 02:36 AM|LINK
Dim myCode as String Dim codeArray As String() = New String() {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10"}How can i check myCode the user enter with the codeArray that i already set up by using if... else
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: How to use array
May 28, 2012 03:00 AM|LINK
codeArrar.Contains(mycode) if it contains the it will return true else false may i request you to use integer instead of string as the values are integer but though you are using string codeArrar.Contains(mycode) will work
shahrizar198...
Member
6 Points
38 Posts
Re: How to use array
May 28, 2012 03:40 AM|LINK
hi mudasir khan
thanks for your suggestion.
can i ask you a question, is there any code for not contain array?
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: How to use array
May 28, 2012 08:47 AM|LINK
no sorry, if the Contains return false then its considered to be not in array