O'Reilly logo

ASP.NET MVC Framework Unleashed by Stephen Walther

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. C# and VB.NET Language Features

ASP.NET MVC takes advantage of many advanced features of the C# and VB.NET languages. Some of these features were not introduced into these languages until C# 3.0 and Visual Basic 9.0. This appendix provides you with a brief overview of these new language features.

Type Inference

Both C# and Visual Basic can infer the type of a variable when you create a local variable. For example, the following line of code creates a new string variable named message with the value "Hello World!":

(C#)

var message = "Hello World!";

(VB)

Dim message = "Hello World!" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required