troubleshooting Question

Array of Variables vs. Array of Object - VB.NET

Avatar of F-J-K
F-J-KFlag for Canada asked on
ProgrammingVisual Basic Classic.NET Programming
8 Comments3 Solutions222 ViewsLast Modified:
1. Can you please explain the differences between the following array declarations and which is declaration correct?

    Private courseList As Course() = New Course(5) {}
    Private courseList(5) As Course()

2. I want i know is both declarations allow courseList to carry a reference to the actual object.

3. What about this one: Dim values() As Integer = {1, 2, 3}
Integer is a class, so what values will hold in here? Will it hold the actual number (1,2,3) or their references? If values hold the actual numbers 1,2,3 then Integer is not a class datatype, its a primitive because as i know array can hold actual values of primitive datatype values. Can you please clarify..

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros