Wrox Programmer Forums
|
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 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 February 14th, 2004, 07:07 PM
amo amo is offline
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can someone see what i did wrong here chapter 6

I keep getting the blue squiggles for the coma beside darren" and one on friends in the AddFriendsToList function. Does anyone have an idea? Here is the source that I thought you'd probably need to see:

    Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
        'Define an array to hold friends in...
        Dim friends() As String = ("Darren", "Edward", "Alex", _
        "Charlotte","Len")

        'show the friends...
        AddFriendsToList(friends)

            End Sub

    Sub AddFriendsToList(ByVal friends() As String)
        'find upper and lower bounds of array using
        'Ubound and Lbound methods...
        MessageBox.Show("Upper bound: " & UBound(friends), "Array Demo")
        MessageBox.Show("Lower bound: " & LBound(friends), "Array Demo")

        ' sort list
        Array.Sort(friends)

        'how big is the array?
        'use length method to find out total of array
        'insert - 1 to get highest number array supports
        Dim upperBound As Integer = friends.Length - 1

        ' go through each friend...
        ' index variable represents the numbers assigned in array
        Dim index As Integer
        For index = upperBound To 0 Step -1

            'add each on to the list...
            lstFriends.Items.Add(friends(index))

        Next

    End Sub
End Class


 
Old April 8th, 2004, 01:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you still having problems with this code?

XUMUSKIEFAN
Wrox Moderator





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - scaffold error, wrong number of args davidtspf BOOK: Beginning Ruby on Rails 12 August 13th, 2010 11:20 PM
Help me!Who can tell me where is wrong? kevinchen2004 C# 2 March 7th, 2005 06:22 AM
Right or wrong? ÕÅÃÍ C++ Programming 6 February 27th, 2004 02:27 AM
Is Chapter 13 Code wrong??? miggitty VB.NET 2002/2003 Basics 0 December 31st, 2003 12:20 AM





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