dc900
asked on
Set the number of elements in an array from input receivied via console.
I need to Dimension an array of integers and set the number of elements in the array based on the response recieved from the console. Can someone provide an example. I have tried the example below, but Lenth is read only.
Dim arValues() As Integer ' Array to store values
Dim intElements As Integer ' The number elements or values to be entered
Console.Write("Number of elements in the array (less than 100) : ")
intElements = Console.ReadLine()
' arValues.Length = Int32.Parse(intElements)
I am looking for some guidance or sample code that will help me complete this. Any information will be greatly appreciated. Thanks. DC900
My Environment
Visual Studio 2005 & VB.NET
Dim arValues() As Integer ' Array to store values
Dim intElements As Integer ' The number elements or values to be entered
Console.Write("Number of elements in the array (less than 100) : ")
intElements = Console.ReadLine()
' arValues.Length = Int32.Parse(intElements)
I am looking for some guidance or sample code that will help me complete this. Any information will be greatly appreciated. Thanks. DC900
My Environment
Visual Studio 2005 & VB.NET
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.