أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
In my opinion using var forces me to use good names for the variables and ultimately lead to more readable code. I always use var for temporary variables. On the other hand I strive to keep temporary variables to minimum in accordance with good coding practices.
The obvious disadvantage is that you cannot write bad code when using var or the reader would invariably be confused.
It reduces the readability of the code, when someone else is reading your code especially when some person is new to an existing project.
There has been a lot of dispute over the use of var. My general rules are the following.
Basically, the goal is to make it easier to read the code. If you feel that var suffices because the assignment is obvious, use var. Use the full type name as a hint for the reader when you feel it's necessary.
هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟