JSW21
asked on
Dim string * 9
Dim Response As String * 9
Dim Correct As String * 9
Dim Buffer As String * 128
Hi gurus
I want to convert this to this to vb.net, can somebody give some guideline?
Thanks,
Dim Correct As String * 9
Dim Buffer As String * 128
Hi gurus
I want to convert this to this to vb.net, can somebody give some guideline?
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
But, if you really need fixed length strings :>(, then your syntax is fine. What issue are you having
ASKER
It said
"missing line break" and "end of statement expected"
"missing line break" and "end of statement expected"
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys
I followed and added these line to make sure I get what I wanted.
correct = Left(correct, 8)
I followed and added these line to make sure I get what I wanted.
correct = Left(correct, 8)
One consequence of this reimplementation of strings is that VB .NET does not have fixed-length strings, as does VB 6. Thus, the following code is illegal:
Dim Name As String * 30
Note, though, that strings in VB .NET are immutable. That is, although you do not have to declare a string's length in advance, once a value is assigned to a string, its length cannot change. If you change that string, the .NET Common Language Runtime actually gives you a reference to a new String object.
http://ondotnet.com/pub/a/dotnet/excerpt/vbnetnut_appa/index.html?page=2
Good Luck.
Dim Name As String * 30
Note, though, that strings in VB .NET are immutable. That is, although you do not have to declare a string's length in advance, once a value is assigned to a string, its length cannot change. If you change that string, the .NET Common Language Runtime actually gives you a reference to a new String object.
http://ondotnet.com/pub/a/dotnet/excerpt/vbnetnut_appa/index.html?page=2
Good Luck.
If you need it for random access file operations then:
http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.vbfixedstringattribute.aspx
http://msdn.microsoft.com/en-us/library/aa903289(VS.71).aspx
http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.vbfixedstringattribute.aspx
http://msdn.microsoft.com/en-us/library/aa903289(VS.71).aspx