<I> <BLOCKQUOTE> <P style=''MARGIN: 0px''>βBased on my own experience, I can safely say that every .NET developer who reads this will have at least one βahaβ moment and will be a better developer for it.β</P> <P style=''MARGIN: 0px''> </I>βFrom the Foreword by Don BoxΒ </P> </BLOCKQUOTE> <P style
C# Programming Language (Covering C# 4.0), The
β Scribed by Anders Hejlsberg, Mads Torgersen, Scott Wiltamuth, Peter Golde
- Publisher
- Addison-Wesley Professional
- Year
- 2010
- Tongue
- English
- Leaves
- 865
- Series
- Microsoft .NET Development Series
- Edition
- 4
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
βBased on my own experience, I can safely say that every .NET developer who reads this will have at least one βahaβ moment and will be a better developer for it.β
βFrom the Foreword by Don BoxΒ
The popular C# programming language combines the high productivity of rapid application development languages with the raw power of C and C++. Updated to cover the new features of C# 4.0, including dynamic binding, named and optional parameters, and covariant and contravariant generic types, this release takes the language to the next level by adding the ability to cleanly write programs that donβt rely on static type definitions. This allows dynamic programming languages such as Python, Ruby, and JavaScript to feel native to C#. The C# Programming Language, Fourth Edition, continues to be the authoritative and annotated technical reference for C# 4.0.
Β
Written by Anders Hejlsberg, the languageβs architect, and his colleagues, Mads Torgersen, Scott Wiltamuth, and Peter Golde, this volume has been completely updated for C# 4.0. The book provides the complete specification of the language, along with descriptions, reference materials, code samples, and annotations from twelve prominent C# gurus.
Β
The many annotations bring a depth and breadth of understanding rarely found in any programming book. As the main text of the book introduces the concepts of the C# language, cogent annotations explain why they are important, how they are used, how they relate to other languages, and even how they evolved.
Β
This book is the definitive, must-have reference for any developer who wants to understand C#. With annotations from: Brad Abrams, Joseph Albahari, Krzysztof Cwalina, Jesse Liberty, Eric Lippert, Christian Nagel, Vladimir Reshetnikov, Marek Safar, Chris Sells, Peter Sestoft, Jon Skeet, and Bill Wagner.
Β
Β
β¦ Table of Contents
Contents......Page 6
Foreword......Page 12
Preface......Page 14
About the Authors......Page 16
About the Annotators......Page 18
1 Introduction......Page 20
1.1 Hello, World......Page 22
1.2 Program Structure......Page 23
1.3 Types and Variables......Page 25
1.4 Expressions......Page 32
1.5 Statements......Page 35
1.6 Classes and Objects......Page 40
1.7 Structs......Page 69
1.8 Arrays......Page 72
1.9 Interfaces......Page 75
1.10 Enums......Page 77
1.11 Delegates......Page 79
1.12 Attributes......Page 80
2.2 Grammars......Page 84
2.3 Lexical Analysis......Page 86
2.4 Tokens......Page 90
2.5 Preprocessing Directives......Page 104
3.1 Application Start-up......Page 118
3.2 Application Termination......Page 119
3.3 Declarations......Page 120
3.4 Members......Page 124
3.5 Member Access......Page 126
3.6 Signatures and Overloading......Page 136
3.7 Scopes......Page 139
3.8 Namespace and Type Names......Page 146
3.9 Automatic Memory Management......Page 151
3.10 Execution Order......Page 156
4 Types......Page 158
4.1 Value Types......Page 159
4.2 Reference Types......Page 171
4.3 Boxing and Unboxing......Page 174
4.4 Constructed Types......Page 179
4.5 Type Parameters......Page 183
4.6 Expression Tree Types......Page 184
4.7 The dynamic Type......Page 185
5.1 Variable Categories......Page 188
5.2 Default Values......Page 194
5.3 Definite Assignment......Page 195
5.4 Variable References......Page 211
5.5 Atomicity of Variable References......Page 212
6 Conversions......Page 214
6.1 Implicit Conversions......Page 215
6.2 Explicit Conversions......Page 223
6.3 Standard Conversions......Page 232
6.4 User-Defined Conversions......Page 233
6.5 Anonymous Function Conversions......Page 238
6.6 Method Group Conversions......Page 245
7.1 Expression Classifications......Page 250
7.2 Static and Dynamic Binding......Page 253
7.3 Operators......Page 257
7.4 Member Lookup......Page 266
7.5 Function Members......Page 269
7.6 Primary Expressions......Page 297
7.7 Unary Operators......Page 345
7.8 Arithmetic Operators......Page 350
7.9 Shift Operators......Page 362
7.10 Relational and Type-Testing Operators......Page 363
7.11 Logical Operators......Page 374
7.12 Conditional Logical Operators......Page 377
7.13 The Null Coalescing Operator......Page 379
7.14 Conditional Operator......Page 380
7.15 Anonymous Function Expressions......Page 383
7.16 Query Expressions......Page 392
7.17 Assignment Operators......Page 408
7.19 Constant Expressions......Page 414
7.20 Boolean Expressions......Page 416
8 Statements......Page 418
8.1 End Points and Reachability......Page 419
8.2 Blocks......Page 421
8.3 The Empty Statement......Page 423
8.4 Labeled Statements......Page 425
8.5 Declaration Statements......Page 426
8.6 Expression Statements......Page 431
8.7 Selection Statements......Page 432
8.8 Iteration Statements......Page 439
8.9 Jump Statements......Page 448
8.10 The try Statement......Page 457
8.12 The lock Statement......Page 462
8.13 The using Statement......Page 464
8.14 The yield Statement......Page 468
9.1 Compilation Units......Page 472
9.2 Namespace Declarations......Page 473
9.3 Extern Aliases......Page 475
9.4 Using Directives......Page 476
9.5 Namespace Members......Page 482
9.7 Namespace Alias Qualifiers......Page 483
10.1 Class Declarations......Page 486
10.2 Partial Types......Page 500
10.3 Class Members......Page 509
10.4 Constants......Page 525
10.5 Fields......Page 528
10.6 Methods......Page 539
10.7 Properties......Page 564
10.8 Events......Page 578
10.9 Indexers......Page 585
10.10 Operators......Page 590
10.11 Instance Constructors......Page 598
10.12 Static Constructors......Page 605
10.13 Destructors......Page 608
10.14 Iterators......Page 611
11 Structs......Page 626
11.1 Struct Declarations......Page 627
11.2 Struct Members......Page 628
11.3 Class and Struct Differences......Page 629
11.4 Struct Examples......Page 638
12.1 Array Types......Page 644
12.4 Array Members......Page 647
12.5 Array Covariance......Page 648
12.6 Array Initializers......Page 649
13.1 Interface Declarations......Page 652
13.2 Interface Members......Page 658
13.4 Interface Implementations......Page 664
14.1 Enum Declarations......Page 682
14.2 Enum Modifiers......Page 683
14.3 Enum Members......Page 684
14.5 Enum Values and Operations......Page 687
15 Delegates......Page 690
15.1 Delegate Declarations......Page 691
15.3 Delegate Instantiation......Page 695
15.4 Delegate Invocation......Page 696
16 Exceptions......Page 700
16.2 The System.Exception Class......Page 702
16.3 How Exceptions Are Handled......Page 703
16.4 Common Exception Classes......Page 704
17 Attributes......Page 706
17.1 Attribute Classes......Page 707
17.2 Attribute Specification......Page 711
17.3 Attribute Instances......Page 717
17.4 Reserved Attributes......Page 718
17.5 Attributes for Interoperation......Page 726
18 Unsafe Code......Page 728
18.1 Unsafe Contexts......Page 729
18.2 Pointer Types......Page 732
18.3 Fixed and Moveable Variables......Page 735
18.4 Pointer Conversions......Page 736
18.5 Pointers in Expressions......Page 739
18.6 The fixed Statement......Page 747
18.7 Fixed-Size Buffers......Page 752
18.8 Stack Allocation......Page 755
18.9 Dynamic Memory Allocation......Page 757
A.1 Introduction......Page 760
A.2 Recommended Tags......Page 762
A.3 Processing the Documentation File......Page 773
A.4 An Example......Page 779
B.1 Lexical Grammar......Page 786
B.2 Syntactic Grammar......Page 796
B.3 Grammar Extensions for Unsafe Code......Page 828
C: References......Page 832
A......Page 834
B......Page 836
C......Page 837
D......Page 840
E......Page 842
F......Page 844
H......Page 845
I......Page 846
J......Page 848
L......Page 849
M......Page 850
N......Page 851
O......Page 852
P......Page 853
Q......Page 855
R......Page 856
S......Page 857
T......Page 859
U......Page 860
V......Page 861
W......Page 862
Z......Page 863
π SIMILAR VOLUMES
βBased on my own experience, I can safely say that every .NET developer who reads this will have at least one βahaβ moment and will be a better developer for it.β βFrom the Foreword by Don BoxΒ The popular C# programming language combines the high productivity of rapid application development
About the Author Ian Griffiths is an independent WPF consultant, developer, speaker and Pluralsight instructor and a widely recognized expert on the subject. He lives in London but can often be found on various developer mailing lists and newsgroups, where a popular sport is to see who can get him