Table of Contents
4.2.1 Class types..........................................................................................................................................66
4.2.2 The object type....................................................................................................................................66
4.2.3 The string type....................................................................................................................................66
4.2.4 Interface types.....................................................................................................................................67
4.2.5 Array types..........................................................................................................................................67
4.2.6 Delegate types.....................................................................................................................................67
4.3 Boxing and unboxing 67
4.3.1 Boxing conversions.............................................................................................................................67
4.3.2 Unboxing conversions.........................................................................................................................68
5. Variables 71
5.1 Variable categories 71
5.1.1 Static variables....................................................................................................................................71
5.1.2 Instance variables................................................................................................................................71
5.1.2.1 Instance variables in classes.........................................................................................................71
5.1.2.2 Instance variables in structs..........................................................................................................72
5.1.3 Array elements....................................................................................................................................72
5.1.4 Value parameters................................................................................................................................72
5.1.5 Reference parameters..........................................................................................................................72
5.1.6 Output parameters...............................................................................................................................72
5.1.7 Local variables....................................................................................................................................73
5.2 Default values 73
5.3 Definite assignment 73
5.3.1 Initially assigned variables..................................................................................................................76
5.3.2 Initially unassigned variables..............................................................................................................76
5.4 Variable references 76
6. Conversions77
6.1 Implicit conversions 77
6.1.1 Identity conversion..............................................................................................................................77
6.1.2 Implicit numeric conversions..............................................................................................................77
6.1.3 Implicit enumeration conversions.......................................................................................................78
6.1.4 Implicit reference conversions............................................................................................................78
6.1.5 Boxing conversions.............................................................................................................................78
6.1.6 Implicit constant expression conversions............................................................................................78
6.1.7 User-defined implicit conversions.......................................................................................................78
6.2 Explicit conversions 79
6.2.1 Explicit numeric conversions..............................................................................................................79
6.2.2 Explicit enumeration conversions.......................................................................................................80
6.2.3 Explicit reference conversions............................................................................................................80
6.2.4 Unboxing conversions.........................................................................................................................81
6.2.5 User-defined explicit conversions.......................................................................................................81
6.3 Standard conversions 81
6.3.1 Standard implicit conversions.............................................................................................................81
6.3.2 Standard explicit conversions..............................................................................................................82
6.4 User-defined conversions 82
6.4.1 Permitted user-defined conversions....................................................................................................82
6.4.2 Evaluation of user-defined conversions..............................................................................................82
6.4.3 User-defined implicit conversions.......................................................................................................83
6.4.4 User-defined explicit conversions.......................................................................................................83
7. Expressions 85
Copyright
Ó
Microsoft Corporation1998 1999-2000. All Rights Reserved. v