List Info

Thread: Dynamically Creating Varibles




Dynamically Creating Varibles
user name
2006-07-16 23:53:24
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;

}

I want my variables to be temp0, temp1, temp2, etc.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

Dynamically Creating Varibles
user name
2006-07-17 08:24:47
I don't Know exactly, But Try this

string temp[i]=i*3;

or string temp(i)=i*3;

Try It.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

Dynamically Creating Varibles
user name
2006-07-27 16:11:56
why do you need to dynamiclally create variables?
Instead you use arrays&nbsp; or linked lists .
those are equivalent to creating variables dynamically.
And one thing, there is no such thing in any language as dynamically creating variables.
Balaji Birajdar
C# Developer.

On 7/17/06, ann <gmail.com">ann.smithrygmail.com> wrote:

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;

}

I want my variables to be temp0, temp1, temp2, etc.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )