# Why does the dynamic?

In C# you can create the iteration counter of type dynamic
`for (dynamic i = 0; i < 10; i++)`
But why? Ie as I understand it, at first I so I can keep record of for example, using int, and then substitute back short to lose when changing from int to short accuracy and thus to drop the counter? If not, what type of meter is generally specified as dynamic , because int is enough?
June 27th 19 at 15:20
June 27th 19 at 15:22
So do not specify dynamic, what's the problem ?

int short on accuracy and thus discard counter
I do not understand.
June 27th 19 at 15:24
type dynamic exists only at compile time but not at run time

source
i.e. after compilation, the compiler translates it (if possible) to the appropriate type (e.g. int)
why counter type generally specified as dynamic

I also don't see (no) sense so indicate. This is not exactly the thing for which introduced the essence of the ( dynamic ). More efficient use is in JSON objects and to interact with .COM
June 27th 19 at 15:26
no sense and given that work with dynamic types bear a lot of overhead, it doubly makes no sense.

Find more questions by tags C#