but you could do this also with an extra variable. I'm not sure about dynamic. The source code with dynamic variables is a bit confusing. You don't know exactly which type a variable is. And you have to look where you have initalized it..
In this case, yes. It's an overly simplified example to show how dynamic differs from var. Var is determined at compile time, dynamic at runtime.
One thing that I'm puzzling about var is how can you tell this:
var amount = 1000;
is amount double int int32 int64 long? Which one is it?
Why not check it yourself? Get the type from amount. It's really that simple.