c# - I get an error that says cannot implicitly convert string type to int. -


i have xml nodelist child node named "rating" rating of int type

progressbar1.value = xlist[0].childnodes[1].firstchild.value; 

how use tostring method here? tried putting @ end of line still doesnt work

progressbar.value property int xmlnode.value returns string. , error pointed, there no implicit conversation string int.

if xmlnode.value value valid integer, need parse integer int32.parse method like;

progressbar1.value = int32.parse(xlist[0].childnodes[1].firstchild.value); 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -