MVC使用var的示例 [英] MVC Examples use of var

查看:82
本文介绍了MVC使用var的示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我生活在泡沫中,还是太新了,但是我想知道是否有人注意到Microsoft在许多MVC示例中大量使用'var'来声明变量而不是特定类型?是有目的的,还是现在要做的事情,还是只是个人风格?

Maybe I live in a bubble, or am just too new, but I was wondering if anyone else has noticed the heavy use of 'var' to declare variables instead of a specific type in many of the MVC examples by Microsoft? Is there a purpose for this, or is it the "in" thing to do now, or just personal style?

推荐答案

Jared Parsons在

Jared Parsons talked about this in his blog I don't agree with his conclusions (as my comment there indicates), but this article should explain why it's used so much.

这篇关于MVC使用var的示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆