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
Michael Mortensen
NA
8
4.3k
Calling a variable with a variable
Feb 27 2014 5:57 AM
So I posted the same question but with calling a label with a variable
(http://www.c-sharpcorner.com/Forums/Thread/246996/)
Now I need to call a variable with a variable.
I've tried to modify the code given in the before mentioned thread, but with no luck.
So my question, can it be done? And if so, how?
Saying I have a variable called Cookie, I need to call the variable that equals what is written in the Cookie variable.
Say, Cookie = "Cake"; I would wanna call the Cake variable.
As mentioned I've tried modifying the code given to the label question (thread as mentioned before), but it didn't work. Here's the code I tried:
String TheLabel = (String)this.Controls[cookie];
Please help, I will love you forever if you do :)
Reply
Answers (
3
)
Calling a label with a variable (SOLVED)
we need web scrapping with social networking site