vb.net - End of statement expected - defining a variable -


i error "end of statement expected" when try , declare variable vram

dim vram string  if vramt.value = 1     vram = 256m     vramt.value = 2     vram = 512m     vramt.value = 3     vram = 768m     vramt.value = 4     vram = 1024m     vramt.value = 5     vram = 1280m     vramt.value = 6     vram = 1636m     vramt.value = 7     vram = 1792m     vramt.value = 8     vram = 2048m end if 

thanks help. easy, can't seem work out :(

you need use elseif on each subsequent line after first if, or use select case instead.

  if vramt.value = 1         vram = 256m   elseif vramt.value = 2         vram = 512m   ...   end if 

here's how select case

select case vramt.value     case 1         vram = 256m     case 2         vram = 512m     ... end select 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -