473,467 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating Variables On-The-Fly

This might be an absurd question, but is it possible to create
variables on the fly?

For example, if I have an array of values

myArray(0) = "foo"
myArray(1) = "bar"
myArray(2) = "foobar"

I would like to loop through the array and create variables named
"foo", "bar", and "foobar"

Is this possible?

Thank you!


Jul 19 '05 #1
1 1290
The dictionary object does this for you.

Key,Value concept.

dlbjr
Pleading sagacious indoctrination!
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Manoj Paramu Das | last post by:
Hi, Is there a way to save a page/some data(read variables) as a .pdf files without using 3rd party components? Any Sample code would be really helpful. Thanks in Advance. Regards Manoj Das
12
by: jyu.james | last post by:
I'm trying to detect reads of uninitialized global variables (that are declared in one file, and used in another as an extern). I know that ANSI C initializes all global variables to 0, however,...
6
by: BMax | last post by:
Hello I want to create a byte and use it as a buffer, then access it with a binaryreader or streamreader. what is important is to be able to read different variables form that, like readint16,...
2
by: Technical Group | last post by:
Friends, Can anybody help me out by sending a piece of C# code showing how to add an active directory user to a particular user group? If the group does not exist, then create it. Thanks in...
5
by: Frank Wisniewski | last post by:
I use static variables in my asp.net apps instead of application variables to store global parameters, its worked well for me so far but I was wondering if it is efficient. Does anyone know how...
2
by: New 2 .NET | last post by:
Hi, I am trying to create a find Dialog box for my notepad "test" application, to help me learn .NET (I am an experienced vb6 programmer). How do I create variables that are available on all forms...
2
by: ann | last post by:
Is there any way to dynamically creat variables? In other words, I want to be able to do something like that: for(int i=0; i<size; i++){ string temp+i = i*3; }
1
by: BillE | last post by:
My application relies on session variables to keep track of the currently selected customer. When a new window is opened using File-New-Window in Internet Explorer, the session variables are...
6
by: tjboudreaux | last post by:
Hi, This might be a crazy question, but does anyone know how to add variables dynamically to a class. Here's what I want to do. I have a class Model, which I inherit for interfacing with...
18
by: Bruce | last post by:
When I do this: <input id="someName" type="text"> <script type="text/javascript"> alert(someName.nodeName); </script> Both IE6 and Firefox alert("INPUT"). Why isn't "someName" undefined?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.