473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

questions about arrays and collections

H,

i'm starting with asp.net/vb.net and have some questions about arrays and
collections:

1) what's the difference between:
dim x() as string
and
dim x as array

2) can variable 'x' in the second case contain anything (string, integer
.... together)?

3) what is the correct syntax?
dim x as arraylist
or
dim x as arraylist()

4) what to choose between:
dim x as array (or if no difference dim x() )
and
dim x as arraylist

5) what to choose between:
dim x as arraylist
and
dim x as list(of string)
Thanks for helping me.
Gilbert

Feb 24 '07
12 1324
Goran,

"The" new in the sentence as it is used, gives the idea that it replaces;
"a" new means that it is an addition, very simple in my opinion. Both are
completely valid, there is not any idea of replacing and there is not any
preference for one of those, so there is not a "the" new.

Cor

"Göran Andersson" <gu***@guffa.co mschreef in bericht
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Cor Ligthert [MVP] wrote:
>Very little correction on your for the rest very fine explanation.
>>The first one is the new syntax,

The first is a new syntax,

Cor

I don't understand how that is a correction?

You removed "one" which makes it implied, but it's still there.

Then you changed "the new" to "a new", which doesn't change the meaning of
the sentence either.

So, what's the difference?

--
Göran Andersson
_____
http://www.guffa.com

Feb 25 '07 #11
Cor Ligthert [MVP] wrote:
Goran,

"The" new in the sentence as it is used, gives the idea that it replaces;
"a" new means that it is an addition, very simple in my opinion. Both are
completely valid, there is not any idea of replacing
What makes you think that just because something is new, it implies that
it replaces everything that was before?
and there is not any
preference for one of those, so there is not a "the" new.
Oh, yes, there is a preference. I prefer the new syntax, but that is of
course only my own preference. :)
>
Cor

"Göran Andersson" <gu***@guffa.co mschreef in bericht
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>Cor Ligthert [MVP] wrote:
>>Very little correction on your for the rest very fine explanation.

The first one is the new syntax,
The first is a new syntax,

Cor
I don't understand how that is a correction?

You removed "one" which makes it implied, but it's still there.

Then you changed "the new" to "a new", which doesn't change the meaning of
the sentence either.

So, what's the difference?

--
Göran Andersson
_____
http://www.guffa.com


--
Göran Andersson
_____
http://www.guffa.com
Feb 25 '07 #12
>
Oh, yes, there is a preference. I prefer the new syntax, but that is of
course only my own preference. :)
As I have read it, but I assume you knew that.

:-)

(By the way I have no preference at all, but there were some long
discussions in this newsgroup lately)

:-)

Cor
Feb 25 '07 #13

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

Similar topics

10
2031
by: KN | last post by:
I know both are pretty much the same and it comes down to personal choice. But I have to make the choice for the team. Things so far that I am considering 1. XML documentation in C# -- thats good.. not there in VB.net?? 2. Some language features of VB.Net like Redim(makes it easier for developers), but not good enough reason. 3. C# is in more like standard languages and key words used are more
1
3149
by: jose luis fernandez diaz | last post by:
Hi, In the chapter 4 'Collections and Records' of the 'PL/SQL User's Guide and Reference Release 8.1.6' book there is the next paragrap: "For example, PL/SQL supports implicit (automatic) datatype conversion between host arrays and index-by tables (but not nested tables). So, the most efficient way to pass collections to and from the database server is to use anonymous PL/SQL blocks to bulk-bind input and output
10
7046
by: mike | last post by:
If I have 2 object arrays like: var txtobj = theform.getElementsByTagName("input"); var selobj = theform.getElementsByTagName("select"); and i want to iterate over them I'd like to combine them and then iterate over them. so I would do something like this below, but that doesn't look right. var bothobj = txtobj+selobj;
3
9976
by: Kurzweil | last post by:
I need to make a two dimensional array of objects. These objects are of type Influence. How do I declare such an array? Now I use: private object influences; influences = GetInfluences(); // GetInfluences returns type Influence But when I need to use something from te array I have to typecast from
18
40007
by: Mike Bartels | last post by:
Hi Everyone! I have two Arrays A and B. Both arrays are byte arrays with 7 bytes each. The contents of array A and B are the same A = {1, 2, 3, 4, 5, 6, 7}; B = {1, 2, 3, 4, 5, 6, 7}; When I do
1
4152
by: Michael Fitzpatrick | last post by:
Transferring arrays from C DLL's to VB.Net I have a DLL written in C. This DLL reads a text file and creates a several very large arrays, 500,000 points and even larger. I would like the get the data in VB.Net so that I can plot it. Presently I am creating an equally sized array in VB and copying the data from the DLL's array into the VB array. There must be a better way. I looked into using a SAFEARRAY but it looks to me that VB.Net...
1
8706
by: Rob Griffiths | last post by:
Can anyone explain to me the difference between an element type and a component type? In the java literature, arrays are said to have component types, whereas collections from the Collections Framework are said to have an element type. http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html
12
1413
by: Gilbert | last post by:
H, i'm starting with asp.net/vb.net and have some questions about arrays and collections: 1) what's the difference between: dim x() as string and dim x as array
15
2495
Samishii23
by: Samishii23 | last post by:
First, images... I have a project that, at this time and version I am working with, I have 648 main stay images, so to say, plus another 100 or so in side features. They are going to stored in a outside .dll. Though I can't figure out if I want to use the Resources feature with C# rather then the "Direct" calling if you will. I have, in many Learning projects in the past have just used the direct call "C:\\Image.jpg" with success, even...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.