ENGLISH

Beginning C# 7 Programming with Visual Studio 2017

Book information

Publisher
Wrox
Year
2018
ISBN
978-1-119-45868-5
Language
english
Format
PDF
Filesize
11 MB (11991862 bytes)
Pages
887\887
Time added
2018-08-07 08:16:10

Description

Contents......Page 3 Intro......Page 16 C# Language......Page 24 Introducing C#......Page 25 What’s in the .NET Framework?......Page 26 Writing Applications Using the .NET Framework and .NET Core......Page 27 Applications You Can Write with C#......Page 32 Visual Studio 2017 Products......Page 33 Solutions......Page 34 Writing a C# Program......Page 36 The Solution Explorer......Page 45 The Error List Window......Page 46 Variables & Expressions......Page 54 Simple Types......Page 59 Literal Values......Page 64 Mathematical Operators......Page 68 Assignment Operators......Page 73 Operator Precedence......Page 74 Namespaces......Page 75 Flow Control......Page 79 Boolean Bitwise and Assignment Operators......Page 82 Operator Precedence Updated......Page 84 The if Statement......Page 85 The switch Statement......Page 89 do Loops......Page 93 while Loops......Page 95 for Loops......Page 97 Interrupting Loops......Page 98 Infnite Loops......Page 99 More about Variables......Page 102 Implicit Conversions......Page 103 Explicit Conversions......Page 105 Explicit Conversions Using the Convert Commands......Page 107 Enumerations......Page 110 Structs......Page 115 Arrays......Page 118 Functions......Page 135 Return Values......Page 138 Parameters......Page 140 Variable Scope in Other Structures......Page 152 Parameters and Return Values versus Global Data......Page 154 Local Functions......Page 155 Debugging & Error Handling......Page 167 Debugging in Nonbreak (Normal) Mode......Page 168 Debugging in Break Mode......Page 176 try…catch…fnally......Page 186 Throw Expressions......Page 193 Listing and Confguring Exceptions......Page 194 Intro to OOP......Page 197 What Is an Object?......Page 199 The Life Cycle of an Object......Page 202 Static and Instance Class Members......Page 203 Interfaces......Page 205 Inheritance......Page 206 Polymorphism......Page 209 Relationships between Objects......Page 211 Operator Overloading......Page 212 Reference Types versus Value Types......Page 213 Defiing Classes......Page 220 Interface Defnitions......Page 223 Constructor Execution Sequence......Page 229 The Class View Window......Page 233 The Object Browser......Page 235 Adding Classes......Page 236 Class Diagrams......Page 237 Defning Class Members......Page 250 Defning Fields......Page 251 Defning Methods......Page 252 Defning Properties......Page 253 Tuple Deconstruction......Page 258 Refactoring Members......Page 259 Automatic Properties......Page 260 Hiding Base Class Methods......Page 261 Calling Overridden or Hidden Base Class Methods......Page 263 Using Nested Type Defnitions......Page 264 Implementing Interfaces in Classes......Page 267 Planning the Application......Page 272 Writing the Class Library......Page 273 A Client Application for the Class Library......Page 280 Collections, Comparisons & Conversions......Page 285 Using Collections......Page 287 Defning Collections......Page 292 Indexers......Page 293 Adding a Cards Collection to CardLib......Page 295 Keyed Collections and IDictionary......Page 298 Iterators......Page 299 Iterators and Collections......Page 304 Deep Copying......Page 305 Adding Deep Copying to CardLib......Page 306 Type Comparisons......Page 308 Pattern Matching with the is Operator Pattern Expression......Page 313 Value Comparisons......Page 314 Overloading Conversion Operators......Page 329 The as Operator......Page 331 Generics......Page 334 Nullable Types......Page 336 The System.Collections.Generic Namespace......Page 344 Defning Generic Classes......Page 355 Defning Generic Interfaces......Page 365 Defning Generic Methods......Page 366 Defning Generic Delegates......Page 367 Contravariance......Page 369 Additional C# Techniques......Page 373 Adding Custom Exceptions to CardLib......Page 376 What Is an Event?......Page 377 Handling Events......Page 379 Defning Events......Page 382 Reading Attributes......Page 398 Creating Attributes......Page 399 Object Initializers......Page 401 Collection Initializers......Page 403 The dynamic Type......Page 413 Optional Parameters......Page 417 Named Parameters......Page 418 Anonymous Methods Recap......Page 423 Lambda Expressions for Anonymous Methods......Page 424 Lambda Expression Parameters......Page 427 Lambda Expression Statement Bodies......Page 428 Lambda Expressions as Delegates and Expression Trees......Page 429 Lambda Expressions and Collections......Page 430 Windows Programming......Page 437 Basic Desktop Programming......Page 438 XAML in Action......Page 440 WPF Controls......Page 443 Properties......Page 445 Events......Page 449 Basic Layout Concepts......Page 454 Layout Panels......Page 457 The About Window......Page 466 The Options Window......Page 471 Data Binding......Page 480 Starting a Game with the ListBox Control......Page 485 Advanced Desktop Programming......Page 492 Styles......Page 493 Templates......Page 494 Triggers......Page 496 Animations......Page 497 Implementing Dependency Properties......Page 499 Routed Commands with Menus......Page 512 Refactoring the Domain Model......Page 517 The ViewModel......Page 524 Completing the Game......Page 532 Cloud & Cross-Platform Programming......Page 543 Basic Cloud Programming......Page 544 Advanced Cloud Programming & Deployment......Page 569 NET Standard & NET Core......Page 588 Shared Project, PCL, and .NET Standard......Page 593 Cross Platform......Page 599 Optimized for the Cloud......Page 600 Performance......Page 601 Modular Design......Page 602 Self-Contained Deployment Model......Page 604 Identifying Third-Party Dependencies......Page 614 Choosing the Platforms to Target for the Program......Page 615 ASP & ASP Core......Page 617 ASP.NET Web Forms......Page 621 ASP. NET MVC......Page 622 ASP.NET Core......Page 625 ASP.NET Web Site versus ASP.NET Web Application Project Types......Page 626 Server Controls......Page 628 Input Validation......Page 629 State Management......Page 630 Authentication and Authorization......Page 631 Razor Syntax......Page 636 Input Validation......Page 637 State Management......Page 638 Authentication and Authorization......Page 639 Dependency Injection......Page 640 Data Access......Page 647 Files......Page 648 The File and Directory Classes......Page 650 The FileInfo Class......Page 651 Path Names and Relative Paths......Page 653 Classes for Using Streams......Page 654 The FileStream Object......Page 655 The StreamWriter Object......Page 662 The StreamReader Object......Page 665 Asynchronous File Access......Page 667 Reading and Writing Compressed Files......Page 668 XML & JSON......Page 679 The XmlElement Class......Page 684 Changing the Values of Nodes......Page 689 LINQ......Page 703 LINQ to XML Functional Constructors......Page 704 Working with XML Fragments......Page 707 Declaring a Variable for Results Using the var Keyword......Page 712 Specify Condition: where Clause......Page 713 Deferred Query Execution......Page 714 Query Syntax versus Method Syntax......Page 715 Lambda Expressions......Page 716 Databases......Page 736 Additional Techniques......Page 763 WCF......Page 764 WCF Communication Protocols......Page 766 Addresses, Endpoints, and Bindings......Page 767 Contracts......Page 769 Behaviors......Page 770 Hosting......Page 771 The WCF Test Client......Page 777 Defning WCF Service Contracts......Page 780 Self-Hosted WCF Services......Page 787 Universal Apps......Page 796 Tiles and Badges......Page 799 Adaptive Displays......Page 800 Sandboxed Apps......Page 808 Navigation between Pages......Page 813 The CommandBar Control......Page 815 Managing State......Page 817 Packaging an App......Page 821 Creating the Package......Page 822 Exercise 5......Page 824 Exercise 2......Page 825 Exercise 3......Page 826 Exercise 6......Page 827 Exercise 4......Page 828 Exercise 3......Page 829 Exercise 3......Page 830 Exercise 5......Page 831 Exercise 4......Page 832 Exercise 5......Page 833 Exercise 4......Page 834 Exercise 5......Page 835 Exercise 1......Page 836 Exercise 3......Page 837 Exercise 4......Page 838 Exercise 2......Page 839 Exercise 5......Page 840 Exercise 1......Page 842 Exercise 2......Page 843 Exercise 4......Page 847 Exercise 1......Page 848 Exercise 3......Page 849 Exercise 4......Page 850 Exercise 1......Page 851 Exercise 3......Page 853 Exercise 1......Page 854 Exercise 1......Page 855 Exercise 4......Page 856 Exercise 3......Page 857 Exercise 1......Page 858 Exercise 3......Page 859 Exercise 5......Page 860 Exercise 1......Page 861 Exercise 3......Page 862 Exercise 4......Page 863 Exercise 5......Page 865 Exercise 1......Page 866 Exercise 2......Page 867 Index......Page 868

Similar books