Dim data As [Byte]() = System.Text.Encoding.ASCII.GetBytes(message)?

  • Thread starter Thread starter Emilio
  • Start date Start date
E

Emilio

Question about

Dim data As [Byte]() = System.Text.Encoding.ASCII.GetBytes(message)


Would it be the same to write:

Dim data() As Byte = System.Text.Encoding.ASCII.GetBytes(message) ?
 
[Byte] is only used if you have created a Type Byte and want to discriminate
between the Type Byte and your own [Byte]. If you do not have a home grown
Type of that name, dont use it.

The syntax for declaring and array in the help file AFAIK, does not show the
Dim data As Type() but favours the first declaration Dim data() As Type.
However, they do both compile and the resultant types are the same.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
 
Back
Top