Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi

I Want to create a an array variable on the fly during runtime and this is what I have so far
VB
Dim variables As New Dictionary(Of String, Integer)()
Dim MyVar As String = "DynamicVariable"

   For i As Integer = 1 To 10
       variables(MyVar & i.ToString) = i
   Next
Posted
Comments
Sergey Alexandrovich Kryukov 25-Mar-13 18:32pm    
How is that code related to the question.
—SA

1 solution

You cannot create a "variable", you can create an array object: Dim myArray() As Char = New Char(12) {}, for example.

I don't think it can really help you. You are not trying to program or learn programming; you are just doing something you have no idea about. You really need to read some elementary manual and try to learn the very basics, to start with. And with .NET, you should at least understand variables, types, type members, references, reference types vs value types, boxing, methods, method parameters and their passing, and more.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900