Hey, is there a magical way to shorten variables in Visual C# as in PHP? For example in place of
$user_nickname
, $user_email
, $user_rank
.
They could use$user["nickname"]
, $user["email"];
, $user["rank"]
.
Now if you ask me, I think the second row looks much more organized. Is such thing possible in C#?
I know about enum
function, but so far all examples I've met were only able to put things into list, like {0, 1, 2, 3, 4}, what I would need is {"hi" => "hullo", "bye" => "says crocodile", "dingus" => "shmingus"} and then being able to recall it with something would look something like the row from above (the lower one).