1) First of all, try it!
2) As I see, you mix/confuse
var
with
dynamic
. And are speaking
pointers. But there are not pointers in c#. Actually there are, but not how you think (see:
http://www.c-sharpcorner.com/UploadFile/rajeshvs/PointersInCSharp11112005051624AM/PointersInCSharp.aspx[
^]). So if you really want to use this C/C++ approach, go on, but it will be hard.
3) What do you expect from changing the variable type? You gain nothing at all.
4) Behind the dynamic metatype there is a logic, there is lot of code. That code will take time to execute. This is why you will loose considerable performance when using it this way.
5) Dynamic is more useful in interop situations:
Get rid of COM Interop DLL by using the new C# 4 dynamic keyword[
^]
.. and more:
Adventures with C# 4.0 dynamic - ExpandoObject, ElasticObject, and a Twitter client in 10 minutes[
^]