Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 25th, 2004, 05:02 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default { and } to hold an array

I've seen

Code:
myArray = {"element 1", "element 2", "element 3"}
used many times in vb and vb.net, and have even used them myself to initialise arrays. Even the vb.net forms designer uses them. However, I don't know the 'hard and fast' rules for using them - when they work, it's great, but sometimes I have to do assignment line by line. I've looked in several vb.net books and tried to search on google, but no cigar as yet. Does anyone know the rules / know of a site detailing the rules for curly braces?

Thanks

 
Old November 25th, 2004, 05:36 AM
Authorized User
 
Join Date: Oct 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Visual Studio documentation seems to cover it at:

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcn7/html/vacondeclaringarrays.htm
 
Old November 25th, 2004, 09:15 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default

doh! Thanks for that - I was looking in the index, trying to find curly braces in the list. Never thought to look under array!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
Getting hold of Form size after maximizing Salte C# 1 November 13th, 2004 02:53 AM
How much of data can a ms access database hold? snowydust Pro VB Databases 2 October 31st, 2004 06:58 AM
How much of data can a ms access database hold? snowydust VB Databases Basics 5 August 30th, 2004 08:05 PM
datatype to hold 3000 chars mikeuk PHP Databases 8 July 20th, 2004 10:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.