dynamic variable in c#?
Posted
by terrani
on Stack Overflow
See other posts from Stack Overflow
or by terrani
Published on 2009-08-15T21:27:44Z
Indexed on
2010/04/16
19:43 UTC
Read the original article
Hit count: 302
c#
|dynamic-variables
Hi,
is it possible to use dynamic variable (not sure about naming) in c#?
in php, I can do
$var_1 = "2";
$var_2 = "this is variable 2";
$test = ${"var_".$var_1};
echo $test;
output: this is variable 2;
can we do this in c# ?
© Stack Overflow or respective owner