Chapter 2. Syntax of the C# Language

C# has all the features of any powerful, modern language. If you are familiar with Java, C, or C++, you’ll find most of C#’s syntax very familiar. If you have been working in Visual Basic or related areas, you should read this chapter to see how C# differs from VB. You’ll quickly see that every major operation you can carry out in Visual Basic.NET has a similar operation in C#.

The two major differences between C# and Visual Basic are (1) C# is case sensitive (most of its syntax is written in lowercase), and (2) every statement in C# is terminated with a semicolon (;). Thus, C# statements are not constrained to a single line, and there is no line continuation character.

In Visual Basic, we could write the ...

Get C# Design Patterns: A Tutorial now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.