sayeth
asked on
convert from AscW() integer to string
Dim A As String = "pimp"
Dim B As Integer
Dim C As String
B = AscW(A)
' how do i convert B back to the string pimp
C = 'B
Dim B As Integer
Dim C As String
B = AscW(A)
' how do i convert B back to the string pimp
C = 'B
ASKER
Ok, what query can i use to convert string to a integer and be able to convert it back to a string
Not sure what you are intending to do but something like the code below may work.
Unfortunately I can't think of a better way of doing it right at the moment.
Unfortunately I can't think of a better way of doing it right at the moment.
Dim CharacterCodes As New List(Of Integer)
For Each Character In A.ToCharArray
CharacterCodes.Add(AscW(Character))
Next
Dim RebuiltStringWriter As New System.IO.StringWriter
For Each CharacterCode In CharacterCodes
RebuiltStringWriter.Write(ChrW(CharacterCode))
Next
Dim RebuiltString = RebuiltStringWriter.ToString
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry i had a meeting. Ok
What do you want to do with "B"?....
Idle Mind: I m using a predefine string in my interface and i can only store integer. so i need the store integer convert back to a string to show the user if they go back to that interface or not.
If it is not possible, i will do it the the long way, using if else statement or case statement
What do you want to do with "B"?....
Idle Mind: I m using a predefine string in my interface and i can only store integer. so i need the store integer convert back to a string to show the user if they go back to that interface or not.
If it is not possible, i will do it the the long way, using if else statement or case statement
I'll go with "not possible"...at least not using anything built-in to the .Net framework.
Could you explain more about your interface and the storing of the value?...that doesn't make any sense at the moment.
Could you explain more about your interface and the storing of the value?...that doesn't make any sense at the moment.
ChrW(B) will demonstrate this and return "p".