|
-
May 20th, 2004, 08:02 AM
#1
Thread Starter
Hyperactive Member
Simple Question
Can anyone tell me the difference between these two lines of code?
Code:
Dim sBuff As Byte() = Encoding.ASCII.GetBytes(Msg)
Dim sBuff() As Byte = Encoding.ASCII.GetBytes(Msg)
I'm sure there is some difference even though they perform exactely the same. Just one of those little nags that get me because I can't seem to find the answer in the MSDN Library.
-
May 20th, 2004, 08:06 AM
#2
you can't specify array bounds on the first one.
eg:
VB Code:
Dim strBuff As Byte([u]100[/u]) [COLOR=green]'/// this won't work
[/COLOR]
Dim strBuff(100) As Byte[COLOR=green]'/// this will work
[/COLOR]
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
May 20th, 2004, 09:05 AM
#3
yay gay
In the first one you are just instanciating a byte variable. In the second one you are creating a variable holder for an array of bytes.
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|