S
squelly
In the VB.net framework class library document for
HTTPWebresponse.getResponseStream the following code snippet appears:
....
Dim read(256) As [Char]
' Reads 256 characters at a time.
Dim count As Integer = readStream.Read(read, 0, 256)
Console.WriteLine("HTML..." + ControlChars.Lf + ControlChars.Cr)
While count > 0
' Dumps the 256 characters to a string and displays the string to
the console.
Dim str As New [String](read, 0, count)
Console.Write(str)
count = readStream.Read(read, 0, 256)
End While
....
I've never come across the syntax for the declarations of [Char] and
[String], and the sample seems to work with or without the brackets.
Anyone know what the brackets are for?
Thanks,
Squelly
HTTPWebresponse.getResponseStream the following code snippet appears:
....
Dim read(256) As [Char]
' Reads 256 characters at a time.
Dim count As Integer = readStream.Read(read, 0, 256)
Console.WriteLine("HTML..." + ControlChars.Lf + ControlChars.Cr)
While count > 0
' Dumps the 256 characters to a string and displays the string to
the console.
Dim str As New [String](read, 0, count)
Console.Write(str)
count = readStream.Read(read, 0, 256)
End While
....
I've never come across the syntax for the declarations of [Char] and
[String], and the sample seems to work with or without the brackets.
Anyone know what the brackets are for?
Thanks,
Squelly