Download presentation
Presentation is loading. Please wait.
Published byJustin Fox Modified over 9 years ago
1
1
2
2
3
Classes are not just containers for methods ◦ Virtually all are classes ◦ Blueprint/Cookie Cutter/Recipe ◦ Objects – instance of the class (new) ◦ Type “prop” tab tab OOP – vast topic 3
4
4
5
Formatting: http://msdn.microsoft.com/en-us/library/dwhawy9k.aspxhttp://msdn.microsoft.com/en-us/library/dwhawy9k.aspx Padding: http://msdn.microsoft.com/en-us/library/txafckwd.aspxhttp://msdn.microsoft.com/en-us/library/txafckwd.aspx 5
6
6
7
7
8
8
9
9
10
Class publicA protected B internal C privateD SubClass publicA protected B internal C privateD ASSEMBLY SubClass (outside package) publicA protectedB internal C privateD Class (outside package) publicA protectedB internal C privateD Assembly is a chunk of precompiled code that can be executed by the.NET runtime environment. Usually, a.NET program consists of one or more assemblies
11
11
12
12
13
13
14
14
15
15
16
16 It's the marker for Inheritance and/or the constructor call chain.
17
17
18
18
19
19
20
20
21
21
22
22
23
23
24
24
25
25
26
26
27
27
28
28
29
29
30
30
31
31
32
32
33
33
34
34
35
35
36
36
37
37
38
38
39
39
40
40
41
static readonly field is set at run time, and can thus be modified by the containing class the value of a const field is set to a compile time constant. In the static readonly case, the containing class is allowed to modify it only in the variable declaration (through a variable initializer) in the static constructor (instance constructors, if it's not static) static readonly is typically used if the type of the field is not allowed in a const declaration, or when the value is not known at compile time. Instance readonly fields are also allowed. Remember that for reference types, in both cases (static and instance) the readonly modifier only prevents you from assigning a new reference to the field. It specifically does not make immutable the object pointed to by the reference. 41
42
42
43
43
44
44
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.