Colleagues,
I have, in some Sub, declared a memvar at the beginning as Char array of 14. Now I'd like to change it to Char array of 16MB (just do not want to multiply them local memvars incessantly).
Here's the code:
Being "old school", I presume that trying to read more than 14 chars into lcBuffer would result in it accepting only those 14 chars. (Am I right, BTW? )
Attempt to re-Dim lcBuffer to lcBuffer(2 ^ 14) As Char erred with message "Local variable 'lcBuffer' is already declared in the current block."
Question is: how do I re-declare or, at least, re-assign a local memvar within the same block?
OR
Would "Using - End Using" construct help in this respect?
Please advise.
TIA!
Regards,
Ilya
I have, in some Sub, declared a memvar at the beginning as Char array of 14. Now I'd like to change it to Char array of 16MB (just do not want to multiply them local memvars incessantly).
Here's the code:
Code:
Dim lcBuffer(14) As Char
Using loStreamReader As StreamReader = New StreamReader(tcFileIn)
loStreamReader.Read(lcBuffer, 0, 14)
End Using
Being "old school", I presume that trying to read more than 14 chars into lcBuffer would result in it accepting only those 14 chars. (Am I right, BTW? )
Attempt to re-Dim lcBuffer to lcBuffer(2 ^ 14) As Char erred with message "Local variable 'lcBuffer' is already declared in the current block."
Question is: how do I re-declare or, at least, re-assign a local memvar within the same block?
OR
Would "Using - End Using" construct help in this respect?
Please advise.
TIA!
Regards,
Ilya