TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yamid
NA
98
0
How to use a string as a name of a variable in c#
Dec 17 2010 9:07 AM
Hi mates,
How to use a string , to be a variable name, for example
suppose X="WELL"
then I want to have an array with this name -> double [] WELL = new double[10];
more specifically I want to create a set of arraies, in which the name of array is obtained by a loop:
for ( int i=0;i<20;i++)
{
string X= "WELL"+i.ToString();
double [] X = new double [10]; //???
}
Then I want to have a set of array :
double [] WELL1 =new double [10];
double [] WELL2 =new double [10];
...
double [] WELL19 = new double[10];
Thanks,
Reply
Answers (
2
)
What's wrong with this SQL statement| Thanks
why the parenthesis around the data type?