473,480 Members | 2,840 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Whats the Diff?

What is the difference between these two statements?

Dim OutData() as Byte
Dim OutData as [Byte]()

I'm not seeing it...

--
Thanks
Sueffel
Nov 20 '05 #1
4 1101
"Sueffel" <so*****@somewhere.com> schrieb
What is the difference between these two statements?

Dim OutData() as Byte
Dim OutData as [Byte]()

I'm not seeing it...


In the first line, the brackets are after "OutData", in the second line
after "[Byte]".

..... oh .... you mean the different meanings? ;-) There is no difference.
Both are equal. BTW, you don't need the "[" and "]".

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "Sueffel" <so*****@somewhere.com> scripsit:
What is the difference between these two statements?

Dim OutData() as Byte

Dim OutData as [Byte]()


There is no difference, both will declare a byte array. But why do you
use the square brackets?

More information on the square brackets:

<http://msdn.microsoft.com/library/en-us/vbls7/html/vblrfVBSpec2_2.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Sueffel,
There is no difference, they both declare an array of bytes.

The [] in the second one is used to escape an identifier allowing you to use
a keyword for an identifier. Seeing as the Byte identifier is the same as
the Byte keyword, both are used to refer to the System.Byte type there is no
reason to escape it. Where you need to use [] is when you are using a
keyword to refer to an identifier and that keyword is not valid in that
context, such as Enum.

If [Enum].IsDefined(GetType(MyEnum), myValue) Then

The () in both cases says you have an array. Whether you include the () on
the identifier or the type is a matter of preference I normally include it
on the identifier, unless I have to include it on the type (such as the
return value of a property or function.

Hope this helps
Jay

"Sueffel" <so*****@somewhere.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
What is the difference between these two statements?

Dim OutData() as Byte
Dim OutData as [Byte]()

I'm not seeing it...

--
Thanks
Sueffel

Nov 20 '05 #4

"Sueffel" <so*****@somewhere.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
What is the difference between these two statements?

Dim OutData() as Byte
Dim OutData as [Byte]()

I'm not seeing it...

--
Thanks
Sueffel

I was wondering becuse I saw some sample code that had that decleration, and I wasn't sure if it was more efficient on speed or memory. Thank you for the clarification, I can go back to what I'm used to , dim OutData() as Byte and be happy!

Thanks again everyone,
Sueffel
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 11/18/2003
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2506
by: Charley | last post by:
I've got a diff file that I think is a patch for a bunch of file in a directory. How do I apply this file? I thought it was #patch myfile.diff But that does nothing. I must be missing...
9
6495
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the...
2
2557
by: Showjumper | last post by:
Whats the diff between the 2 and when do you use one and not the other?
8
1601
by: buc | last post by:
I have a simple combox on the screen that is bound via a datareader to a stored proc in sql that returns a simple string. The code is 'load stored proc then dReader =...
6
6430
by: Igor Shevchenko | last post by:
Hi! Suppose I have "pg_dump -s" of two pg installs, one is "dev", another is "production". Their schemas don't differ too much, and I want to get a "diff -u"-like schema diff so I can quickly...
4
4928
by: Andreas Kasparek | last post by:
Hola! I'm preparing my master thesis about a XML Merge Tool implementation and was wondering if there is any open standard for XML diff regarding topics like: - is a diff result computed on...
1
4606
by: damod.php | last post by:
what is the life time(min, Max) of session variables,, I want to know about sessions whats session what is cookie whts the diff between where the sessinon stored where the cookie stored i want...
6
1532
by: damod.php | last post by:
<?php ...<? both are the php tags whats the diff b/w name of the tag??? then i write the code using <? this tag full coding , but the server can not accept my (<?)tag,, its only used <? php tag...
0
1033
by: sriNani | last post by:
Whats the diff bitween console app performance and windows sevice performance..? which can suggestable to follow from .net 2005?
6
3278
by: Aaron Gray | last post by:
Hi, I am working on an HTML WYSISYG Wiki and need to display a diff page like WikiPedia does if two people edit a file at the same time to give the second user the diff. Basically with additions...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.