Use of var keyword in C#

I still think var can make code more readable in some cases. If I have a Customer class with an Orders property, and I want to assign that to a variable, I will just do this: var orders = cust.Orders; I don’t care if Customer.Orders is IEnumerable<Order>, ObservableCollection<Order> or BindingList<Order> – all I want is … Read more

php variable changes when clicked on html link [closed]

Try this, is PHP: <?php if (isset($_GET[‘money’])) { $money = rob_shop($_GET[‘money’]); echo ‘You now have: ‘.$money.'<br>’; } else { $money = 100; echo ‘You now have: ‘.$money.'<br>’; } echo ‘<a href=”https://stackoverflow.com/questions/27303586/?money=”.$money .'”>rob a shop</a>’; function rob_shop($money){ $money = $money + 75; return $money; } ?> But the best way to do it is with ajax … Read more