Documente Academic
Documente Profesional
Documente Cultură
Improved C++ 1
C# 3.0
Chapter 16 Improved C++
Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
C# 30
Improved C++ 2
A Better C/C++
C# is based on the C/C++ ssyntax
nta
This what makes it so appealing to the C++ developer
Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
C# 30
Improved C++ 3
Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
C# 30
Improved C++ 4
The if Statement
The C# if statement executes a block of
p
evaluates to true
code if an expression
The expression must be a bool expression
C# 30
Improved C++ 5
Unlike C/C++/Java
The C# switch can evaluate a string
Another difference is that any case must end with
break (return or goto case)
To get the same fall through C/C++/Java functionality,
we can use the goto case statement
Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
C# 30
Improved C++ 6
Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
C# 30
Improved C++ 7
Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
C# 30
Improved C++ 8
Summary
Creating a ne
new lang
language
age is a good
pp
y to fix some p
pitfalls
opportunity
C# has changed and improved many mechanisms
such as Arrays, & Enums, Strings, OOP keywords