vb.net - Convert string to integer with CINT -



vb.net - Convert string to integer with CINT -

const gconintrows1st integer = 15 const gconintrows4th integer = 20

i trying convert string integer

by using:

intnumber = cint(strnumberselected(intfirst5balls))

professor's

inttemperature = cint(strtemperatures(intmonth))

but how not work.

the professor's version worked fine cannot figure out why intnumber not.

yes, first time doing vb

it looks strnumberselected string array, correct? , you're asking string in array @ position intfirst5balls?

take example:

dim strarray string() = split("hi|there|everybody", "|")

the split() function split our long string @ each occurrence of pipe ("|").

the resulting string array have next 3 elements:

"hi" "there" "everybody"

and you'd reference these elements indexes:

strarray(0) = "hi" strarray(1) = "there" strarray(2) = "everybody"

if you're getting error 'char' values cannot converted 'integer' array more array of type char, , cint() function cannot convert integer.

you can utilize

integer.tryparse()

to seek valid integer array, sounds bit you're unsure sort of info lives in array.

vb.net

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -