can i use variable content in class/function names?
for example:
string string_1 = "abcd";
double num_2 = 20.5;
int num = 1;
MessageBox.Show(string_{num}); // shows string_1;
[I’m newbie in Visual C# (visual studio 2008)]
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Class and method names must be constant and have to be referred to as constants in code like your example.
You can use reflection and/or the
dynamictype for dynamic behaviour.