Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB VB.NET
Hi
 
I Want to create a an array variable on the fly during runtime and this is what I have so far
 
 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 25-Mar-13 13:18pm
Comments
Sergey Alexandrovich Kryukov at 25-Mar-13 18:32pm
   
How is that code related to the question.
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 390
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,260


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 25 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100