Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. WinForms / WPF .NET
Leggere parte variabile VB 2005
martedì 04 settembre 2007 - 12.08
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
fos
Profilo
| Newbie
25
messaggi | Data Invio:
mar 4 set 2007 - 12:08
Salve,
ho bisogno di leggere soltanto alcuni numeri all'interno di una variabile di tipo long per creare l'algoritmo che trasforma un numero binario in decimale.
Qualcuno sa dirmi come si fa ?
Grazie, Francesco
Faelar
Profilo
| Junior Member
71
messaggi | Data Invio:
mar 4 set 2007 - 12:28
Penso che il modo migliore sia trasformarlo in una stringa e leggere un carattere alla volta.
fos
Profilo
| Newbie
25
messaggi | Data Invio:
mar 4 set 2007 - 13:24
Come si fa a leggere un carattere alla volta ?
Grazie
Faelar
Profilo
| Junior Member
71
messaggi | Data Invio:
mar 4 set 2007 - 13:50
Dim X as long = 1001101 'Crei il numero
dim str as string = x.ToString 'Lo trasformi in una stringa
'Ne esegui la lettura
For I as Integer = 0 to str.Length -1
Msgbox(str(I))
Next I
Anche se forse a te interessa di più così:
For I as Integer = str.Length -1 to 0 step -1
Msgbox(str(I))
Next I
fos
Profilo
| Newbie
25
messaggi | Data Invio:
mar 4 set 2007 - 16:37
Grazie molte !!
Problema risolto.
Alla prossima
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !