Why use var?

Why would you choose to use var instead of the actual type (2:37 min)? I find my code much easier to read if the actual type is used, because then it’s obvious what you’re dealing with. Don’t really understand why one would use var instead. Can anybody enlighten me on this, please?

Hi Vera,

There are lots of discussions on the internet about the pro and cons of var. It’s a matter of taste.

I, personally, prefer explicite declarations. If you do not like var either, do it as I.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms