Оцените презентацию от 1 до 5 баллов!
Тип файла:
ppt / pptx (powerpoint)
Всего слайдов:
19 слайдов
Для класса:
1,2,3,4,5,6,7,8,9,10,11
Размер файла:
831.57 kB
Просмотров:
82
Скачиваний:
0
Автор:
неизвестен
Слайды и текст к этой презентации:
№1 слайд![Common Type System. Value and](/documents_6/089bc081494cd7955216d2f60998f88e/img0.jpg)
Содержание слайда: Common Type System.
Value and reference types in C#.
№2 слайд![AGENDA Common Type System](/documents_6/089bc081494cd7955216d2f60998f88e/img1.jpg)
Содержание слайда: AGENDA
Common Type System
Data Type Class Hierarchy
class Object
Intrinsic Data Types
Variable Declaration and Initialization
Implicitly Typed Local Variables
C# Nullable Types. ?? Operator
Value and Reference Types
Shallow and deep copy
№3 слайд![Common Type System CTS common](/documents_6/089bc081494cd7955216d2f60998f88e/img2.jpg)
Содержание слайда: Common Type System
CTS – common type sestem:
defines how types are declared, used, and managed in the common language runtime,
is an important part of the runtime's support for cross-language integration.
CTS performs the following functions:
Establishes a framework that helps enable cross-language integration, type safety, and high-performance code execution.
Provides an object-oriented model that
supports the complete implementation
of many programming languages.
Defines rules that languages must follow,
which helps ensure that objects written in
different languages can interact with each
other.
Provides a library that contains the
primitive data types
( Boolean, Byte, Char, Int32, and UInt64)
№4 слайд![The Data Type Class Hierarchy](/documents_6/089bc081494cd7955216d2f60998f88e/img3.jpg)
Содержание слайда: The Data Type Class Hierarchy
№5 слайд![Base class Object](/documents_6/089bc081494cd7955216d2f60998f88e/img4.jpg)
Содержание слайда: Base class Object
№6 слайд![Intrinsic Data Types](/documents_6/089bc081494cd7955216d2f60998f88e/img5.jpg)
Содержание слайда: Intrinsic Data Types
№7 слайд![Variable Declaration and](/documents_6/089bc081494cd7955216d2f60998f88e/img6.jpg)
Содержание слайда: Variable Declaration and Initialization
It is a compiler error to make use of a local variable before assigning an initial value.
All intrinsic data types support a default constructor. We can create a variable using the new keyword, which automatically sets the variable to its default value:
• bool variables are set to false.
• Numeric data is set to 0 (or 0.0 in the case of floating-point data types).
• char variables are set to a single empty character.
• BigInteger variables are set to 0. (from System.Numerics.dll)
• DateTime variables are set to 1/1/0001 12:00:00 AM.
• Object references (including strings) are set to null.
№8 слайд![Variable Declaration and](/documents_6/089bc081494cd7955216d2f60998f88e/img7.jpg)
Содержание слайда: Variable Declaration and Initialization
It is more cumbersome to use the new keyword when creating a basic data type variable:
№9 слайд![Implicitly Typed Local](/documents_6/089bc081494cd7955216d2f60998f88e/img8.jpg)
Содержание слайда: Implicitly Typed Local Variables
№10 слайд![C Nullable Types](/documents_6/089bc081494cd7955216d2f60998f88e/img9.jpg)
Содержание слайда: C# Nullable Types
№11 слайд![C Nullable Types and operator](/documents_6/089bc081494cd7955216d2f60998f88e/img10.jpg)
Содержание слайда: C# Nullable Types and operator ??
№12 слайд![Value and Reference Types](/documents_6/089bc081494cd7955216d2f60998f88e/img11.jpg)
Содержание слайда: Value and Reference Types
№13 слайд![Value and Reference Types](/documents_6/089bc081494cd7955216d2f60998f88e/img12.jpg)
Содержание слайда: Value and Reference Types
№14 слайд![Value and References Types,](/documents_6/089bc081494cd7955216d2f60998f88e/img13.jpg)
Содержание слайда: Value and References Types, Assignment Operator
№15 слайд![Parameter Modifiers](/documents_6/089bc081494cd7955216d2f60998f88e/img14.jpg)
Содержание слайда: Parameter Modifiers
№16 слайд![Passing Reference Types by](/documents_6/089bc081494cd7955216d2f60998f88e/img15.jpg)
Содержание слайда: Passing Reference Types by Value and by Reference
№17 слайд![Shallow and deep copy If you](/documents_6/089bc081494cd7955216d2f60998f88e/img16.jpg)
Содержание слайда: Shallow and deep copy
If you have a class or structure that contains only value types, implement your Clone() method using MemberwiseClone():
If you have a custom type that maintains other reference types, you might want to create a new object that takes into account each reference type member variable, in order to get a “deep copy.”
№18 слайд![References MSDN Common Type](/documents_6/089bc081494cd7955216d2f60998f88e/img17.jpg)
Содержание слайда: References
MSDN:Common Type System
Built-in Data Types
Value and Reference Types
Object class
№19 слайд![Questions ?](/documents_6/089bc081494cd7955216d2f60998f88e/img18.jpg)
Содержание слайда: Questions ?