MiserableMad
Active member
- Joined
- Feb 2, 2007
- Messages
- 25
- Programming Experience
- Beginner
First of all I am a newbie...so if you want you can call me a "newbie" or a "freshy", either one is ok...
this is what I have so far *this is a code test that I am working on to get this conversion to work...
but then I realized that each asc() char is more that one integer long, so that did not work...
*I did the for each loop because It only converts one char
but it underlines the "c" (in red) and comes up with this error...
C:\Documents and Settings\Dane\My Documents\Visual Studio Projects\Reg Test\Form1.vb(105): 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit.
So I tried the b &= Chr(convert.tostring(c))
than it gave me a whole bunch of numbers like this...
The asc() works fine, it is the chr() that does not
this is what I have so far *this is a code test that I am working on to get this conversion to work...
VB.NET:
Dim c AsChar
Dim s, b AsString
txtConverted.Text = Nothing
ForEach c In txtConvert.Text
s &= Asc(c)
Next
txtConverted.Text = s
ForEach c In s
b &= Chr(c)
Next
TextBox1.Text = b
but then I realized that each asc() char is more that one integer long, so that did not work...
*I did the for each loop because It only converts one char
but it underlines the "c" (in red) and comes up with this error...
C:\Documents and Settings\Dane\My Documents\Visual Studio Projects\Reg Test\Form1.vb(105): 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit.
So I tried the b &= Chr(convert.tostring(c))
than it gave me a whole bunch of numbers like this...
The asc() works fine, it is the chr() that does not
Last edited: