shapper wrote:
Hello,
I have the following:
1 Dim bRows As Byte()
2 sRows.Read(bRows, 0, Integer.MaxValue)
On line 2 I get an warning saying:
"Variable bRows is used before it has been assigner a value"
How can I solve this?
By assigning it a value.
You have created a reference to a byte array, but you haven't created
the array.
Dim bRows As New Byte()
And what is the difference between using:
Dim bRows As Byte()
And:
Dim bRows() As Byte
There is no difference in result.
The first one is the new syntax that is logical in .NET, as the entire
data type comes after the As keyword.
The second one is the syntax inherited from earlier versions of VB,
where arrays was a special kind of variable instead of just a data type
like any other.
--
Göran Andersson
_____
http://www.guffa.com