fadi Posted August 21, 2004 Posted August 21, 2004 hello all, does anyone know if their exists something like the evel function in .net. the problem is that i want to set a variable value that i dont know its name at design time ex: let's say i have a set of variables str1_1, str1_2, str1_3, etc... i want to set them all in a single for loop for i=1 to 20 somefunction("str1_" & i) = "somevalue" & i next in javascript the function is eval is there a way to do that in .net? Quote
Joe Mamma Posted August 21, 2004 Posted August 21, 2004 for i=1 to 20 somefunction("str1_" & i) = "somevalue" & i next look up 'Invoke'. I'd like to see your actual code as this 'smells' of needing an enumeration and some polymorphic refactoring Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
Arch4ngel Posted August 21, 2004 Posted August 21, 2004 Maybe you shall look at string array or an ArrayList. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.