locked
Need Some Example Of Use Of arrays

    Question

  • Arrays in Visual Basic 

    When you use arrays, you can refer to multiple values by the same name, using a number called an index or subscript to distinguish them from one another. Arrays can shorten and simplify your code, allowing you to create loops that deal efficiently with any number of elements.

    How to Use Arrays, Why We need it to use. THANX

    Giveme Deeply meaninng of Arrays With Some Example
    Giveme Some Examples For Tech me.

     THANX
    Friday, August 28, 2009 4:12 AM

Answers

  • Very simply, an Array is a collection.  You use an array whenever you want to group similar objects together.

    To that end, in modern .Net, think about using Collection objects, especially generics, such as List(), Dictionary(), and others rather than raw arrays.  Let the array become a back-end object utilized by higher-level objects (such as List) which provide greater flexibility and functionality.  Only use Array explicitly when necessary (Interop, or meeting explicit method signatures for example) or when it makes good sense (meeting minimal memory usage, or targeting Interop for example).
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
    • Marked as answer by ShariqDON Tuesday, February 02, 2010 7:36 PM
    Tuesday, September 01, 2009 7:02 PM
  • Assume you want to store the name of 5000 students based on their Student_ID. In this case one option is to declare 5000 String object which can store 5000 names. Another option is to create a String array with 5000 element.

    Example:

    Dim strNames(5000) As String

    Now you can put a loop

    For Id As Integer = 0 To 5000

    strNames(Id) = Console.ReadLine()

    Next

    Hope this helps
    Thanks,
    A.m.a.L
    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:02 AM
    Friday, August 28, 2009 4:45 AM
  • An array can have multiple dimensions . Here is an example of an array with 2 dimensions 0 to 3 or 4 dimensions each

        Dim MyArray(3, 3) As String
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            MyArray(0, 0) = "String 1"
            MyArray(0, 1) = "String 2"
            MyArray(0, 2) = "String 3"
            MyArray(0, 3) = "String 4"
            MyArray(1, 0) = "String 5"
            MyArray(1, 1) = "String 6"
            MyArray(1, 2) = "String 7"
            MyArray(1, 3) = "String 8"
            MyArray(2, 0) = "String 9"
            MyArray(2, 1) = "String 10"
            MyArray(2, 2) = "String 11"
            MyArray(2, 3) = "String 12"
            MyArray(3, 0) = "String 13"
            MyArray(3, 1) = "String 14"
            MyArray(3, 2) = "String 15"
            MyArray(3, 3) = "String 16"
        End Sub

    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Friday, August 28, 2009 5:01 AM
  • The MyArray variable is declared at class level . You can use the values of the array from anywhere in your code . I do not know what you need the array for so it is hard for me to give you an answer but here is an example of some code that uses the array .

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            For x As Integer = 0 To 3
                For y As Integer = 0 To 3
                    ListBox1.Items.Add(MyArray(x, y))
                Next
            Next
        End Sub
    

    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Friday, August 28, 2009 7:32 AM
  • Hi ShariqDON,

    Welcome to MSDN forums!

    The following code demonstrate several different ways to create arrays:

    1. Dim array1(10) As Integer

    2. Dim array2() As Integer = {1, 2, 3, 4}

    3. Dim array3() As Integer

    4. Dim array4(,) As Integer = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}

    5. Dim array5(2, 3) As Integer

    In the first line, the code defines an array of integers that spans from array1(0) to array1(10). This is a 11-element array, because all arrays start at 0 and end with the value defined in the declaration as the upper bound.

    The second line creates an array with four elements numbered 0 through 3, containing the values 1 to 4.

    The third   line demonstrates that it is possible to simply declare a variable and indicate that the variable is an array, without specifying the number of elements in the array. 

    The fourth   line creates a multidimensional array containing three elements at the first level, with each of those elements containing four child elements.

    The last   line of code   shows an alternative way of creating the multidimensional array.

    You can use the following lines to traverse an multidimensional array.

    Dim loopi As Integer

    Dim loopj As Integer

    For loopi = 0 To UBound(array4)

        For loopj = 0 To UBound(array4, 2)

            Console.WriteLine(array4(loopi, loopj).ToString)

        Next

    Next

    You can refer to the following link for more information about array

    http://msdn.microsoft.com/en-us/library/system.array.aspx


    Hope this helps

    Regards

    Jeff Shan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by ShariqDON Tuesday, February 02, 2010 7:37 PM
    Tuesday, September 01, 2009 7:54 AM
  • The only time I use arrays in when dealing with older applications prior to having List(Of T) as they typically can be more work but it’s best to know as Reed mentioned for backend stuff. What is really important is having options and not simply reverting to “what you know.” Suppose all you know are arrays and a problem within your application needs something more robust such as a HashTable? My point is spend time learning what is available from arrays, arraylist, various collections etc. I would move away from arrays and arraylist unless there is a compelling reason not too. A good method of learning is to try things out as shown below which does some basics with arraylist and List(Of T). Note in the LINQ statements even for a simple operation more is needed then in the List.

        Sub Learning()
            Dim AllAnimals As List(Of String) = _
                New List(Of String)(New String() _
                { _
                    "Dog", "Cat", "Moose", "Platypus", _
                    "Mouse", "Bird", "Monkey", "Chipmunk" _
                } _
            )
    
            Dim arrList As New ArrayList
            arrList.AddRange(New String() {"Dog", "Cat", "Mouse", "Bird"})
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
    
            arrList.IndexOf("Dog")
            arrList.RemoveAt(arrList.IndexOf("Dog"))
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            arrList.InsertRange(arrList.IndexOf("Mouse"), New String() {"Snake", "Ant"})
    
            Console.WriteLine()
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            arrList.Sort()
            Console.WriteLine()
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
            arrList.Reverse()
            Console.WriteLine()
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
    
            Dim AnimalList As List(Of String) = New List(Of String)
            AnimalList.AddRange(New String() {"Dog", "Cat", "Mouse", "Bird"})
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            AnimalList.RemoveAt(AnimalList.IndexOf("Dog"))
            Console.WriteLine()
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
            AnimalList.InsertRange(arrList.IndexOf("Mouse"), New String() {"Snake", "Ant"})
            'AnimalList.Insert(0, "Dog")
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
            AnimalList.Sort()
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
            Console.WriteLine()
            AnimalList.Reverse()
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            Dim ListOfQuery = From x In AnimalList _
                        Where AllAnimals.Contains(x) _
                        Select x
    
            Console.WriteLine()
            Console.WriteLine("List(Of String) LINQ")
            For Each item In ListOfQuery
                Console.WriteLine(item)
            Next
    
            Dim ArrayListQuery = From x In arrList _
                                 Where AllAnimals.Contains(x.ToString) _
                                 Select x
    
            Console.WriteLine("ArrayList LINQ")
            For Each item In ArrayListQuery
                Console.WriteLine(item)
            Next
    
        End Sub
    


    If you end up working with another developers code and they use arrays rather than list if you know arrays then fine or with VS2008 or higher simple add a language extension to convert from an array to a list and work that way if possible.

        <Runtime.CompilerServices.Extension()> _
        Public Function ToList(ByVal sender As String()) As List(Of String)
            Dim aList As List(Of String) = New List(Of String)(sender)
            aList.AddRange(sender)
            Return aList
        End Function

    So you might use it like

    Dim MyArray() As String = _
        {"Dog", "Cat", "Mouse", "Bird"}
    .
    .
    .
    .
    .
    Dim MyList As List(Of String) = _
        New List(Of String)(MyArray.ToList())
    



     


    KSG
    • Marked as answer by ShariqDON Tuesday, February 02, 2010 7:36 PM
    Wednesday, September 02, 2009 2:34 PM
  • There is no screen result. What the code will do is populate a two dimensional string array with data.

    Thanks,
    A.m.a.L
    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Friday, August 28, 2009 5:54 AM
  • There are Different Type of Arrays
    for Different Condtion.
    What is Type Of Array , We Use In Which Condtion..


    HI ShariqDon,

    This question is subjective! Using arrays with different dimensions depends on the user needs. Please find the below links which explain types of arrays. I hope they answer your question.

    http://visualbasic.freetutes.com/learn-vb6/lesson6.html

    http://searchwarp.com/swa258112.htm

    Kind Regards


    K Fendi - UK
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Saturday, August 29, 2009 12:21 PM

All replies

  • Assume you want to store the name of 5000 students based on their Student_ID. In this case one option is to declare 5000 String object which can store 5000 names. Another option is to create a String array with 5000 element.

    Example:

    Dim strNames(5000) As String

    Now you can put a loop

    For Id As Integer = 0 To 5000

    strNames(Id) = Console.ReadLine()

    Next

    Hope this helps
    Thanks,
    A.m.a.L
    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:02 AM
    Friday, August 28, 2009 4:45 AM
  • strNames(5000) Is The Type Of Arrays
    Can We Use It In Database?
    Friday, August 28, 2009 4:52 AM
  • I was just providing an example. You can dump the array directly to a database using SqlClient class. But that was not the point of our discussion. So instead of cross posting we can stick to the discussion of Arrays.

    Hope this helps.

    Thanks,
    A.m.a.L
    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    Friday, August 28, 2009 4:58 AM
  • An array can have multiple dimensions . Here is an example of an array with 2 dimensions 0 to 3 or 4 dimensions each

        Dim MyArray(3, 3) As String
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            MyArray(0, 0) = "String 1"
            MyArray(0, 1) = "String 2"
            MyArray(0, 2) = "String 3"
            MyArray(0, 3) = "String 4"
            MyArray(1, 0) = "String 5"
            MyArray(1, 1) = "String 6"
            MyArray(1, 2) = "String 7"
            MyArray(1, 3) = "String 8"
            MyArray(2, 0) = "String 9"
            MyArray(2, 1) = "String 10"
            MyArray(2, 2) = "String 11"
            MyArray(2, 3) = "String 12"
            MyArray(3, 0) = "String 13"
            MyArray(3, 1) = "String 14"
            MyArray(3, 2) = "String 15"
            MyArray(3, 3) = "String 16"
        End Sub

    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Friday, August 28, 2009 5:01 AM
  • An array can have multiple dimensions . Here is an example of an array with 2 dimensions 0 to 3 or 4 dimensions each

        Dim MyArray(3, 3) As String
    
    
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
    
    
            MyArray(0, 0) = "String 1"
    
            MyArray(0, 1) = "String 2"
    
            MyArray(0, 2) = "String 3"
    
            MyArray(0, 3) = "String 4"
    
            MyArray(1, 0) = "String 5"
    
            MyArray(1, 1) = "String 6"
    
            MyArray(1, 2) = "String 7"
    
            MyArray(1, 3) = "String 8"
    
            MyArray(2, 0) = "String 9"
    
            MyArray(2, 1) = "String 10"
    
            MyArray(2, 2) = "String 11"
    
            MyArray(2, 3) = "String 12"
    
            MyArray(3, 0) = "String 13"
    
            MyArray(3, 1) = "String 14"
    
            MyArray(3, 2) = "String 15"
    
            MyArray(3, 3) = "String 16"
    
        End Sub
    
    

    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .
    What Did You Show In Your Post . What is its Screen Results.
    Friday, August 28, 2009 5:44 AM
  • There is no screen result. What the code will do is populate a two dimensional string array with data.

    Thanks,
    A.m.a.L
    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Friday, August 28, 2009 5:54 AM
  • The MyArray variable is declared at class level . You can use the values of the array from anywhere in your code . I do not know what you need the array for so it is hard for me to give you an answer but here is an example of some code that uses the array .

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            For x As Integer = 0 To 3
                For y As Integer = 0 To 3
                    ListBox1.Items.Add(MyArray(x, y))
                Next
            Next
        End Sub
    

    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Friday, August 28, 2009 7:32 AM
  • There are Different Type of Arrays
    for Different Condtion.
    What is Type Of Array , We Use In Which Condtion..
    Saturday, August 29, 2009 11:57 AM
  • Multidimention Array!
    How to You Describe About Multidimention Arrays .

    Saturday, August 29, 2009 12:03 PM
  • There are Different Type of Arrays
    for Different Condtion.
    What is Type Of Array , We Use In Which Condtion..


    HI ShariqDon,

    This question is subjective! Using arrays with different dimensions depends on the user needs. Please find the below links which explain types of arrays. I hope they answer your question.

    http://visualbasic.freetutes.com/learn-vb6/lesson6.html

    http://searchwarp.com/swa258112.htm

    Kind Regards


    K Fendi - UK
    • Marked as answer by ShariqDON Wednesday, September 02, 2009 8:03 AM
    Saturday, August 29, 2009 12:21 PM
  • Hi ShariqDON,

    Welcome to MSDN forums!

    The following code demonstrate several different ways to create arrays:

    1. Dim array1(10) As Integer

    2. Dim array2() As Integer = {1, 2, 3, 4}

    3. Dim array3() As Integer

    4. Dim array4(,) As Integer = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}

    5. Dim array5(2, 3) As Integer

    In the first line, the code defines an array of integers that spans from array1(0) to array1(10). This is a 11-element array, because all arrays start at 0 and end with the value defined in the declaration as the upper bound.

    The second line creates an array with four elements numbered 0 through 3, containing the values 1 to 4.

    The third   line demonstrates that it is possible to simply declare a variable and indicate that the variable is an array, without specifying the number of elements in the array. 

    The fourth   line creates a multidimensional array containing three elements at the first level, with each of those elements containing four child elements.

    The last   line of code   shows an alternative way of creating the multidimensional array.

    You can use the following lines to traverse an multidimensional array.

    Dim loopi As Integer

    Dim loopj As Integer

    For loopi = 0 To UBound(array4)

        For loopj = 0 To UBound(array4, 2)

            Console.WriteLine(array4(loopi, loopj).ToString)

        Next

    Next

    You can refer to the following link for more information about array

    http://msdn.microsoft.com/en-us/library/system.array.aspx


    Hope this helps

    Regards

    Jeff Shan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by ShariqDON Tuesday, February 02, 2010 7:37 PM
    Tuesday, September 01, 2009 7:54 AM
  • Very simply, an Array is a collection.  You use an array whenever you want to group similar objects together.

    To that end, in modern .Net, think about using Collection objects, especially generics, such as List(), Dictionary(), and others rather than raw arrays.  Let the array become a back-end object utilized by higher-level objects (such as List) which provide greater flexibility and functionality.  Only use Array explicitly when necessary (Interop, or meeting explicit method signatures for example) or when it makes good sense (meeting minimal memory usage, or targeting Interop for example).
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
    • Marked as answer by ShariqDON Tuesday, February 02, 2010 7:36 PM
    Tuesday, September 01, 2009 7:02 PM
  • Thanx to all I m New in visual basic
    Wednesday, September 02, 2009 8:14 AM
  • The only time I use arrays in when dealing with older applications prior to having List(Of T) as they typically can be more work but it’s best to know as Reed mentioned for backend stuff. What is really important is having options and not simply reverting to “what you know.” Suppose all you know are arrays and a problem within your application needs something more robust such as a HashTable? My point is spend time learning what is available from arrays, arraylist, various collections etc. I would move away from arrays and arraylist unless there is a compelling reason not too. A good method of learning is to try things out as shown below which does some basics with arraylist and List(Of T). Note in the LINQ statements even for a simple operation more is needed then in the List.

        Sub Learning()
            Dim AllAnimals As List(Of String) = _
                New List(Of String)(New String() _
                { _
                    "Dog", "Cat", "Moose", "Platypus", _
                    "Mouse", "Bird", "Monkey", "Chipmunk" _
                } _
            )
    
            Dim arrList As New ArrayList
            arrList.AddRange(New String() {"Dog", "Cat", "Mouse", "Bird"})
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
    
            arrList.IndexOf("Dog")
            arrList.RemoveAt(arrList.IndexOf("Dog"))
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            arrList.InsertRange(arrList.IndexOf("Mouse"), New String() {"Snake", "Ant"})
    
            Console.WriteLine()
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            arrList.Sort()
            Console.WriteLine()
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
            arrList.Reverse()
            Console.WriteLine()
            For Each animal In arrList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
    
            Dim AnimalList As List(Of String) = New List(Of String)
            AnimalList.AddRange(New String() {"Dog", "Cat", "Mouse", "Bird"})
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            AnimalList.RemoveAt(AnimalList.IndexOf("Dog"))
            Console.WriteLine()
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
            AnimalList.InsertRange(arrList.IndexOf("Mouse"), New String() {"Snake", "Ant"})
            'AnimalList.Insert(0, "Dog")
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            Console.WriteLine()
            AnimalList.Sort()
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
            Console.WriteLine()
            AnimalList.Reverse()
            For Each animal In AnimalList
                Console.WriteLine(animal)
            Next
    
            Dim ListOfQuery = From x In AnimalList _
                        Where AllAnimals.Contains(x) _
                        Select x
    
            Console.WriteLine()
            Console.WriteLine("List(Of String) LINQ")
            For Each item In ListOfQuery
                Console.WriteLine(item)
            Next
    
            Dim ArrayListQuery = From x In arrList _
                                 Where AllAnimals.Contains(x.ToString) _
                                 Select x
    
            Console.WriteLine("ArrayList LINQ")
            For Each item In ArrayListQuery
                Console.WriteLine(item)
            Next
    
        End Sub
    


    If you end up working with another developers code and they use arrays rather than list if you know arrays then fine or with VS2008 or higher simple add a language extension to convert from an array to a list and work that way if possible.

        <Runtime.CompilerServices.Extension()> _
        Public Function ToList(ByVal sender As String()) As List(Of String)
            Dim aList As List(Of String) = New List(Of String)(sender)
            aList.AddRange(sender)
            Return aList
        End Function

    So you might use it like

    Dim MyArray() As String = _
        {"Dog", "Cat", "Mouse", "Bird"}
    .
    .
    .
    .
    .
    Dim MyList As List(Of String) = _
        New List(Of String)(MyArray.ToList())
    



     


    KSG
    • Marked as answer by ShariqDON Tuesday, February 02, 2010 7:36 PM
    Wednesday, September 02, 2009 2:34 PM
  • Very simply, an Array is a collection.  You use an array whenever you want to group similar objects together.

    To that end, in modern .Net, think about using Collection objects, especially generics, such as List(), Dictionary(), and others rather than raw arrays.  Let the array become a back-end object utilized by higher-level objects (such as List) which provide greater flexibility and functionality.  Only use Array explicitly when necessary (Interop, or meeting explicit method signatures for example) or when it makes good sense (meeting minimal memory usage, or targeting Interop for example).
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
    I generally only use arrays if they are multi-dimensional. I happen to have been doing a lot of 2D stuff recently (cellular automata), and I am starting to use a lot more lists. They have Add, Remove, ect. methods which makes everything a lot easier. I have never used the Dictionary type.
    Monday, February 01, 2010 10:02 PM
  • Other collections can hold multiple items easily if you use structures .
    Coding4fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read . Or use the Forum Code Formatter by JohnWein http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/bf977a14-d9d4-4e84-9784-bf76b9e23261
    Tuesday, February 02, 2010 4:51 AM
  • I'm doing a program where i have to use an array and there are ten sales people and each one of them have their own amount of sales. I have to use an array but im trying to figure out how to do an array where each of the people have their own data. How would i code an array for that?

    Friday, December 03, 2010 2:37 PM
  • Clarick

    In the futur, Please create your own thread to ask a question, dont ask question on someone else thread

    You create a class for each person and put these person in the array

    Here an example

     

    Public Class Form1
    
     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      'Create an array of 10 person
      Dim SalesPeople(9) As Person
    
      'Let create 10 person and put them in the list
      For index As Integer = 0 To 9
       SalesPeople(index) = New Person
      Next
    
      'Let enter the info for the 3rd person
      SalesPeople(2).FirstName = "James"
      SalesPeople(2).LastName = "Smith"
      SalesPeople(2).SSN = "XXX XX XXXX"
      SalesPeople(2).LastMonthSale = 88345.68
      SalesPeople(2).LastYearSale = 1345890.28
     End Sub
    
     'This is a person
     Class Person
      Public FirstName As String
      Public LastName As String
      Public SSN As String
      Public LastMonthSale As Double
      Public LastYearSale As Double
     End Class
    End Class
    
    Friday, December 03, 2010 5:47 PM