32,99 €
Stay ahead of the game with this comprehensive guide to the C# programming language Well-known C# expert Rod Stephens gives novice and experienced developers a comprehensive tutorial and reference to standard C#. This new title fully covers the latest C# language standard, C# 5.0, as well as its implementation in the 2013 release of Visual Studio. The author provides exercises and solutions; and his C# Helper website will provide readers and students with ongoing support. This resource is packed with tips, tricks, tutorials, examples, and exercises and is the perfect professional companion for programmers who want to stay ahead of the game. Author Rod Stephens is a well-known programming authority and has written more than 25 programming books covering C#, Java, VB, and other languages. His books have sold more than 150,000 copies in multiple editions. This book's useful exercises and solutions are designed to support training and higher education adoptions. * Learn the full range of C# programming language features * Quickly locate information for specific language features in the reference section * Familiarize yourself with handling data types, variables, constants, and much more * Experiment with editing and debugging code and using LINQ Beginning through intermediate-level programmers will benefit from the accessible style of C# 5.0 Programmer's Reference and will have access to its comprehensive range of more advanced topics. Additional support and complementary material are provided at the C# Helper website, www.csharphelper.com. Stay up-to-date and improve your programming skills with this invaluable resource.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 1279
Veröffentlichungsjahr: 2014
Part I: The C# Ecosystem
Chapter 1: The C# Environment
Visual Studio
The C# Compiler
The CLR
The .NET Framework
Summary
Exercises
Chapter 2: Writing a First Program
Types of Projects
Console Applications
Windows Forms Applications
WPF Applications
Windows Store Applications
Summary
Exercises
Chapter 3: Program and Code File Structure
Hidden Files
Preprocessor Directives
Code File Structure
Comments
Summary
Exercises
Part II: C# Language Elements
Chapter 4: Data Types, Variables, and Constants
Data Types
Variable Declaration Syntax
Initialization
Literal Type Characters
Data Type Conversion
Scope
Parameter Declarations
Properties
Enumerations
Nullable Types
Delegates
Summary
Exercises
Chapter 5: Operators
Arithmetic Operators
Comparison Operators
Logical Operators
Bitwise Operators
Conditional and Null-coalescing Operators
Assignment Operators
Operator Precedence
The StringBuilder Class
DateTime and TimeSpan Operations
Operator Overloading
Summary
Exercises
Chapter 6: Methods
Method Declarations
Extension Methods
Lambda Expressions
Variance
Asynchronous Methods
Summary
Exercises
Chapter 7: Program Control Statements
Decision Statements
Looping Statements
Summary
Exercises
Chapter 8: LINQ
Basic LINQ Query Syntax
Advanced LINQ Query Syntax
Other LINQ Methods
LINQ Extension Methods
LINQ to Objects
LINQ to XML
LINQ to ADO.NET
PLINQ
Summary
Exercises
Chapter 9: Error Handling
Bugs Versus Undesirable Conditions
try catch Blocks
Summary
Exercises
Chapter 10: Tracing and Debugging
The Debug Menu
The Debug ⇒ Windows Submenu
The Breakpoints Window
The Immediate Window
Trace Listeners
Summary
Exercises
Part III: Object-Oriented Programming
Chapter 11: OOP Concepts
Classes
Encapsulation
Inheritance
Polymorphism
Summary
Exercises
Chapter 12: Classes and Structures
Classes
Structures
Constructors
Structure Instantiation Details
Garbage Collection
Events
Static Methods
Summary
Exercises
Chapter 13: Namespaces
Collisions in .NET
The using Directive
The Default Namespace
Making Namespaces
Resolving Namespaces
The global Namespace
Summary
Exercises
Chapter 14: Collection Classes
Arrays
System.Collections
Dictionaries
CollectionsUtil
Stacks and Queues
Generic Collections
Collection Initializers
Iterators
Summary
Exercises
Chapter 15: Generics
Advantages of Generics
Defining Generics
Instantiating Generic Classes
Generic Collection Classes
Generic Methods
Generics and Extension Methods
Summary
Exercises
Part IV: Interacting with the Environment
Chapter 16: Printing
Windows Forms Printing
WPF Printing
Summary
Exercises
Chapter 17: Configuration and Resources
Environment Variables
Registry
Configuration Files
Resource Files
Summary
Exercises
Chapter 18: Streams
Stream
FileStream
MemoryStream
BinaryReader and BinaryWriter
TextReader and TextWriter
StringReader and StringWriter
StreamReader and StreamWriter
Exists, OpenText, CreateText, and AppendText
Custom Stream Classes
Summary
Exercises
Chapter 19: File System Objects
Filesystem Permissions
.NET Framework Classes
Using the Recycle Bin
Summary
Exercises
Chapter 20: Networking
Networking Classes
Downloading Information
Uploading Information
Getting FTP Information
Sending E-mail
Sending Text Messages
Summary
Exercises
Part V: Advanced Topics
Chapter 21: Regular Expressions
Building Regular Expressions
Using Regular Expressions
Summary
Exercises
Chapter 22: Parallel Programming
Interacting with the User Interface
BackgroundWorker
Tasks
Threads
Coordinating Tasks
Thread-Safe Objects
Summary
Exercises
Chapter 23: ADO.NET
Selecting a Database
Using Bound Controls
Loading DataSets
Using ADO.NET
Summary
Exercises
Chapter 24: XML
Writing XML Data
Reading XML Data
Related Technologies
Summary
Exercises
Chapter 25: Serialization
XML Serialization
JSON Serialization
Binary Serialization
Summary
Exercises
Chapter 26: Reflection
Learning About Classes
Getting and Setting Properties
Getting Assembly Information
Invoking Methods
Running Scripts
Summary
Exercises
Chapter 27: Cryptography
Cryptographic Operations
Randomness
Symmetric Key Encryption
Asymmetric Key Encryption
Summary
Exercises
Part VI: Appendices
Appendix A: Solutions to Exercises
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Chapter 24
Chapter 25
Chapter 26
Chapter 27
Appendix B: Data Types
Casting and Converting Values
Parsing Values
Appendix C: Variable Declarations
Initialization Expressions
Using
Enumerated Type Declarations
Appendix D: Constant Declarations
Appendix E: Operators
Arithmetic Operators
Comparison Operators
Logical Operators
Bitwise Operators
Assignment Operators
Conditional and Null-coalescing Operators
Operator Precedence
DateTime and TimeSpan Operators
Operator Overloading
Appendix F: Method Declarations
Methods
Property Procedures
Lambda Functions and Expressions
Extension Methods
Appendix G: Useful Attributes
Useful XML Serialization Attributes
Useful JSON Serialization Attributes
Binary Serialization Attributes
Other Useful Attributes
Appendix H: Control Statements
Decision Statements
Looping Statements
Appendix I: Error Handling
Appendix J: LINQ
Basic LINQ Query Syntax
LINQ Functions
LINQ to XML
LINQ to ADO.NET
PLINQ
Appendix K: Classes and Structures
Classes
Structures
Constructors
Destructors
Events
Appendix L: Collection Classes
Arrays
Collections
Iterators
Appendix M: Generic Declarations
Generic Classes
Generic Methods
Appendix N: Printing and Graphics
Windows Forms Printing
WPF Printing
Appendix O: Useful Exception Classes
Standard Exception Classes
Custom Exception Classes
Appendix P: Date and Time Format Specifiers
Standard Format Specifiers
Custom Format Specifiers
Appendix Q: Other Format Specifiers
Standard Numeric Format Specifiers
Custom Numeric Format Specifiers
Numeric Formatting Sections
Composite Formatting
Enumerated Type Formatting
Appendix R: Streams
Stream Class Summary
Stream
BinaryReader and BinaryWriter
TextReader and TextWriter
StringReader and StringWriter
StreamReader and StreamWriter
Text File Stream Methods
Appendix S: Filesystem Classes
Framework Classes
Special Folders
Recycle Bin
Appendix T: Regular Expressions
Creating Regular Expressions
Regular Expression Options
Using Regular Expressions
Appendix U: Parallel Programming
Interacting with the User Interface
PLINQ
BackgroundWorker
TPL
Tasks
Threads
Appendix V: XML
Special Characters
Writing XML Data
Reading XML Data
Related Technologies
Appendix W: Serialization
XML Serialization
JSON Serialization
Binary Serialization
Appendix X: Reflection
Type
MemberInfo
EventInfo
MethodInfo
FieldInfo
PropertyInfo
ParameterInfo
Titlepage
Copyright
About the Author
About the Technical Editor
Credits
Acknowledgments
Introduction
Who Should Read This Book
Approach
Which Edition of Visual Studio Should You Use?
How This Book Is Organized
How to Use This Book
Necessary Equipment
Conventions
Source Code
Errata
p2p.wrox.com
Important URLs
Advertisement
End-User License Agreement
Figure 1-1
Figure 2-1
Figure 2-2
Figure 2-3
Figure 2-4
Figure 2-5
Figure 2-6
Figure 2-7
Figure 3-1
Figure 3-2
Figure 3-3
Figure 3-4
Figure 3-5
Figure 3-6
Figure 3-7
Figure 3-8
Figure 3-9
Figure 4-1
Figure 6-1
Figure 6-2
Figure 6-3
Figure 8-1
Figure 8-2
Figure 9-1
Figure 9-2
Figure 9-3
Figure 9-4
Figure 10-1
Figure 10-2
Figure 10-3
Figure 10-4
Figure 10-5
Figure 10-6
Figure 11-1
Figure 11-2
Figure 12-1
Figure 12-2
Figure 12-3
Figure 12-4
Figure 12-5
Figure 12-6
Figure 12-7
Figure 12-8
Figure 12-9
Figure 12-10
Figure 13-1
Figure 13-2
Figure 13-3
Figure 13-4
Figure 13-5
Figure 13-6
Figure 13-7
Figure 13-8
Figure 14-1
Figure 14-2
Figure 14-3
Figure 14-4
Figure 14-5
Figure 14-6
Figure 14-7
Figure 15-1
Figure 16-1
Figure 16-2
Figure 16-3
Figure 16-4
Figure 16-5
Figure 16-6
Figure 16-7
Figure 16-8
Figure 16-9
Figure 16-10
Figure 17-1
Figure 17-2
Figure 17-3
Figure 17-4
Figure 19-1
Figure 20-1
Figure 20-2
Figure 20-3
Figure 21-1
Figure 21-2
Figure 21-3
Figure 21-4
Figure 22-1
Figure 23-1
Figure 23-2
Figure 23-3
Figure 23-4
Figure 23-5
Figure 23-6
Figure 23-7
Figure 23-8
Figure 23-9
Figure 23-10
Figure 23-11
Figure 23-12
Figure 23-13
Figure 23-14
Figure 23-15
Figure 23-16
Figure 23-17
Figure 23-18
Figure 24-1
Figure 24-2
Figure 24-3
Figure 24-4
Figure 24-5
Figure 24-6
Figure 25-1
Figure 25-2
Figure 25-3
Figure 26-1
Figure 26-2
Figure 26-3
Figure 26-4
Figure 26-5
Figure 27-1
Figure 27-2
Figure 27-3
Figure 27-4
Figure 27-5
Figure 27-6
Figure A-1
Figure A-2
Figure A-3
Figure A-4
Figure A-5
Figure A-6
Figure A-7
Figure A-8
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
95
96
97
99
100
101
102
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
245
246
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
393
394
395
396
397
399
400
401
402
403
404
405
406
407
408
409
411
412
413
414
415
416
418
419
420
421
422
423
424
425
426
428
430
431
432
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
469
470
471
472
473
474
475
476
477
478
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
733
734
735
736
737
738
739
740
741
743
744
745
746
747
748
749
750
751
753
754
755
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
773
774
775
776
777
778
779
780
781
783
785
786
787
788
790
791
792
793
794
795
796
797
799
801
802
803
804
806
807
809
810
811
812
813
814
815
817
818
821
823
825
826
827
829
830
831
832
833
834
835
836
838
839
840
841
843
844
845
846
847
848
849
850
851
852
854
856
857
858
859
860
861
862
863
865
867
870
872
873
874
875
v
viii
ix
xi
xiii
xxxiii
xxxiv
xxxv
xxxvi
xxxvii
xxxviii
xxxix
xl
xli
Chapter 1
: The C# Environment
Chapter 2
: Writing a First Program
Chapter 3
: Program and Code File Structure
What’s in This Chapter
IL and the CLR
JIT compiling
Programs and assemblies
The .NET Framework
Wrox.com Downloads for This Chapter
Please note that all the code examples for this chapter are available as a part of this chapter’s code download on the book’s website at www.wrox.com/go/csharp5programmersref on the Download Code tab.
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
