September 2014
Intermediate to advanced
396 pages
7h 58m
English
CHAPTER 3
![]()
Syntax
The pure and simple truth is rarely pure and never simple.
—Oscar Wilde
The previous chapters emphasized the similarities between C# and C++/CLI. Now we touch on the main areas where they differ and begin to understand why. These include additional or different keywords, separators, and operators.
Keywords and Separators
In C++, the additional keyword namespace is required when using a namespace (see Table 3-1).
Table 3-1. Namespaces in C# and C++/CLI
C# |
C++/CLI |
|---|---|
using System.Threading; |
using namespace System::Threading; |
System.Console.WriteLine("H"); |
System::Console::WriteLine("H"); |
Moreover, where C# uses dot ...
Read now
Unlock full access