Muutke küpsiste eelistusi

Murach's C# (7th Edition) 7th New edition [Pehme köide]

  • Formaat: Paperback / softback, 349 black & white illustrations
  • Ilmumisaeg: 04-Jan-2021
  • Kirjastus: Mike Murach & Associates Inc.
  • ISBN-10: 1943872538
  • ISBN-13: 9781943872534
  • Formaat: Paperback / softback, 349 black & white illustrations
  • Ilmumisaeg: 04-Jan-2021
  • Kirjastus: Mike Murach & Associates Inc.
  • ISBN-10: 1943872538
  • ISBN-13: 9781943872534
This C# book has been a favorite of developers ever since the 1st edition came out in 2004. So you can be sure that this latest edition will deliver the professional skills you’re looking for today. In fact, it will teach you the C# essentials more easily than ever, as it shows you how to take advantage of the most recent releases of C#, .NET, and Visual Studio.It’s a self-paced book that shows you how to use Visual Studio, C#, and the .NET classes to develop Windows Forms applications…whether you’re new to programming or not. It’s an object-oriented book that shows you how to use business classes, inheritance, and interfaces the way they’re used in the real world. It’s a database programming book that shows you how to create professional database applications using Entity Framework and LINQ or ADO.NET.When you’re done, you’ll be able to develop 3-tiered, object-oriented, Windows Forms applications the way the best professionals do. And you’ll have the essential skills that you need to develop any C# application…whether for the desktop, the web, or mobile devices.

This book gets you off to a fast start by showing you how to use C#, Visual Studio, and .NET to develop Windows Forms applications. Next, it shows you the best techniques for developing object-oriented applications. Then, it shows you how to work with a database…a must in business development…using Entity Framework and LINQ or ADO.NET. Along the way, this book presents the time-saving features available from the most recent releases of C#, .NET, and Visual Studio. The result? You’ll quickly gain the essential skills needed to develop any C# application…whether for the desktop, the web, or mobile devices. In fact, No other introductory C# book teaches you so much, so fast, or so thoroughly.
Section 1 An introduction to Visual Studio
Chapter 1 How To Get Started With Visual Studio
An introduction to .NET development
4(10)
.NET applications
4(2)
Visual Studio and the NET programming languages
6(2)
The NET Framework and NET Core
8(2)
The Visual Studio IDE
10(2)
How a C# application is compiled and run
12(2)
A tour of the Visual Studio IDE
14(14)
How to start Visual Studio
14(2)
How to open or close an existing project
16(2)
How to use the Form Designer
18(2)
How to use the Code Editor
20(2)
How to use the Solution Explorer
22(2)
How to work with Visual Studio's windows
24(2)
How to change the .NET version used by a project
26(2)
How to test a project
28(2)
How to build a project
28(1)
How to run a project
28(2)
Perspective
30(4)
Chapter 2 How To Design A Windows Forms Application
How to get started
34(4)
How to configure Visual Studio
34(2)
How to create a new project
36(2)
How to design a form
38(12)
The design of the Invoice Total form
38(2)
How to add controls to a form
40(2)
How to set properties
42(2)
Common properties for forms and controls
44(2)
How to add navigation features
46(2)
The property settings for the Invoice Total form
48(2)
How to finish your design
50(2)
How to rename the files of a project
50(1)
How to save the files of a project
50(2)
Perspective
52(4)
Chapter 3 How To Code And Test A Windows Forms Application
An introduction to coding
56(6)
Introduction to object-oriented programming
56(2)
How to refer to properties, methods, and events
58(2)
How an application responds to events
60(2)
How to add code to a form
62(8)
How to create an event handler for the default event of a form or control
62(1)
How to delete an event handler
62(2)
How IntelliSense helps you enter the code for a form
64(2)
The event handlers for the Invoice Total form
66(2)
How to detect and correct syntax errors
68(2)
More coding skills
70(10)
How to code with a readable style
70(2)
How to code comments
72(2)
How to work with the Text Editor toolbar
74(1)
How to collapse or expand blocks of code
74(2)
How to use code snippets
76(2)
How to refactor code
78(1)
How to get help information
78(2)
How to run, test, and debug a project
80(6)
How to run a project
80(2)
How to test a project
82(2)
How to debug runtime errors
84(2)
Perspective
86(6)
Section 2 The C# language essentials
Chapter 4 How To Work With Numeric And String Data
How to work with the built-in value types
92(18)
The built-in value types
92(2)
How to declare and initialize variables
94(2)
How to declare and initialize constants
96(2)
How to code arithmetic expressions
98(2)
How to code assignment statements
100(2)
How to work with the order of precedence
102(2)
How to use casting
104(2)
How to use the Math class
106(2)
How to generate random numbers
108(2)
How to work with strings
110(4)
How to declare and initialize a string
110(1)
How to join and append strings
110(2)
How to include special characters in strings
112(2)
How to convert data types
114(6)
The NET structures and classes that define data types
114(2)
How to use methods to convert data types
116(2)
How to use methods to convert numbers to formatted strings
118(2)
Three other skills for working with data
120(6)
How to work with scope
120(2)
How to declare and use enumerations
122(2)
How to work with nullable value types and the null-coalescing operators
124(2)
Two versions of the Invoice Total application
126(4)
The basic Invoice Total application
126(2)
The enhanced Invoice Total application
128(2)
Perspective
130(4)
Chapter 5 How To Code Control Structures
How to code Boolean expressions
134(4)
How to use the relational operators
134(2)
How to use the logical operators
136(2)
How to code conditional statements and expressions
138(10)
How to code if-else statements
138(2)
How to code switch statements
140(2)
How to code switch expressions
142(2)
How to use the conditional operator
144(2)
An enhanced version of the Invoice Total application
146(2)
How to code loops
148(8)
How to code while and do-while loops
148(2)
How to code for loops
150(2)
Loops that use break and continue statements
152(2)
Debugging techniques for programs with loops
154(2)
The Future Value application
156(4)
The design and property settings for the form
156(2)
The code for the form
158(2)
Perspective
160(4)
Chapter 6 How To Code Methods And Event Handlers
How to code and call methods
164(14)
How to code methods
164(2)
How to call methods
166(2)
How to use optional parameters
168(1)
How to use named arguments
168(2)
How to code expression-bodied methods
170(2)
How to use refactoring to create a new method and its calling statement
172(2)
When and how to pass arguments by reference and by value
174(4)
How to work with tuples
178(4)
How to create tuples and refer to their members
178(2)
How to use a tuple as the return type for a method
180(2)
How to work with events and delegates
182(6)
How to generate an event handler for any event
182(2)
How event wiring works
184(2)
How to handle multiple events with one event handler
186(2)
Another version of the Future Value application
188(4)
The event handlers and the CalculateFutureValue() method
188(2)
Some of the generated code
190(2)
Perspective
192(4)
Chapter 7 How To Handle Exceptions And Validate Data
An introduction to exceptions
196(4)
How exceptions work
196(2)
How to display a dialog box
198(2)
How to use structured exception handling
200(10)
How to catch an exception
200(2)
How to use the properties and methods of an exception
202(2)
How to catch specific types of exceptions
204(2)
How to throw an exception
206(2)
The Future Value application with exception handling
208(2)
How to validate data
210(6)
How to validate a single entry
210(2)
How to code generic methods for data validation
212(2)
How to validate multiple entries
214(2)
The Future Value application with data validation
216(4)
The dialog boxes
216(1)
The code
216(4)
Perspective
220(4)
Chapter 8 How To Use Arrays And Collections
How to work with one-dimensional arrays
224(8)
How to create an array
224(2)
How to assign values to the elements of an array
226(2)
How to work with arrays
228(2)
How to use foreach loops to work with arrays
230(2)
How to work with rectangular arrays
232(4)
How to create a rectangular array
232(1)
How to assign values to a rectangular array
232(2)
How to work with rectangular arrays
234(2)
How to work with jagged arrays
236(4)
How to create a jagged array
236(1)
How to assign values to a jagged array
236(2)
How to work with jagged arrays
238(2)
More skills for working with arrays
240(10)
How to use the Array class
240(2)
How to refer to and copy arrays
242(2)
How to code methods that work with arrays
244(2)
How to use the null-conditional operator
246(2)
More ways to refer to array elements
248(2)
How to work with collections
250(16)
Commonly used collection classes
250(2)
Typed vs. untyped collections
252(2)
How to work with a list
254(4)
How to work with a sorted list
258(4)
How to work with queues and stacks
262(2)
How to work with an array list
264(2)
Perspective
266(4)
Chapter 9 How To Work With Dates And Strings
How to work with dates and times
270(8)
How to create a DateTime value
270(2)
How to get the current date and time
272(1)
How to format DateTime values
272(2)
How to get information about dates and times
274(2)
How to perform operations on dates and times
276(2)
How to work with strings
278(12)
The properties and methods of the String class
278(2)
Code examples that work with strings
280(2)
More code examples that work with strings
282(2)
How to use the Parse() and TryParse() methods to validate numeric entries
284(2)
How to work with nullable reference types
286(2)
How to use the StringBuilder class
288(2)
How to format numbers, dates, and times
290(6)
How to format numbers
290(2)
How to format dates and times
292(2)
How to use interpolated strings
294(2)
Perspective
296(4)
Chapter 10 More Skills For Working With Windows Forms And Controls
How to work with controls
300(12)
Five more types of controls
300(2)
How to work with combo boxes and list boxes
302(4)
How to work with check boxes and radio buttons
306(1)
How to work with group boxes
306(2)
How to use Tab Order view to set the tab order
308(2)
How to get the information you need for using a control
310(2)
How to work with multi-form projects
312(12)
How to add a form to a project
312(2)
The code that's generated for a new form
314(2)
How to rename a form
316(2)
How to display the first form of an application
318(2)
How to display a form as a dialog box
320(2)
How to pass data between a form and a custom dialog box
322(2)
How to use the Message Box class
324(4)
How to display a dialog box and get the user response
324(2)
How to use the FormClosing event
326(2)
The Payment application
328(10)
The operation
328(2)
The property settings
330(1)
The code for the Customer form
330(4)
The code for the Payment form
334(4)
Perspective
338(4)
Chapter 11 How To Debug An Application
Basic debugging techniques
342(10)
How to set the debugging options
342(2)
How to work in break mode
344(1)
How to use the Edit and Continue feature
344(2)
How to work with data tips
346(2)
How to use breakpoints
348(2)
How to control the execution of an application
350(2)
How to use the debugging windows
352(16)
How to use the Locals window to monitor variables
352(1)
How to use the Autos window to monitor variables
352(2)
How to use Watch windows to monitor expressions
354(2)
How to use the Immediate window to execute commands
356(2)
How to use the Call Stack window to monitor called methods
358(2)
How to use the Call Hierarchy window to navigate through your code
360(2)
How to use the Output window to view project information
362(2)
How to write data to the Output window
364(2)
How to use the Visualizer dialog boxes to view strings
366(2)
Perspective
368(6)
Section 3 Object-oriented programming
Chapter 12 How To Create And Use Classes
An introduction to classes
374(8)
How classes can be used to structure an application
374(2)
The members you can define within a class
376(2)
The code for the Product class
378(2)
How instantiation works
380(2)
Basic skills for creating a class
382(12)
How to add a class file to a project
382(2)
How to code fields
384(2)
How to code properties
386(2)
How to code methods
388(2)
How to code constructors
390(2)
How to code static members
392(2)
The Product Maintenance application
394(8)
The operation of the Product Maintenance application
394(2)
The classes used by the Product Maintenance application
396(2)
The code for the Product Maintenance application
398(4)
More skills for creating a class
402(12)
How to code auto-implemented properties
402(2)
How to code expression-bodied properties and accessors
404(2)
How to code expression-bodied methods and constructors
406(2)
How to use pattern matching
408(2)
How to use property patterns
410(2)
How to generate code stubs
412(2)
How to browse, display, and edit classes
414(4)
How to browse the classes in a solution
414(2)
How to use the Peek Definition and Go To Definition features
416(2)
How to work with structures and records
418(6)
How to create a structure
418(2)
How to use a structure
420(2)
How to create and use a record
422(2)
Perspective
424(4)
Chapter 13 How To Work With Indexers, Delegates, Events, And Operators
An introduction to the ProductList class
428(4)
The code for a simple ProductList class
428(2)
The specifications for the enhanced ProductList class
430(2)
How to work with indexers
432(6)
How to create an indexer
432(2)
How to code expression-bodied indexers and accessors
434(2)
How to throw an argument exception
436(2)
How to work with delegates and events
438(6)
How to define and use a delegate
438(2)
How to define and use events
440(2)
How to use anonymous methods and lambda expressions with delegates and events
442(2)
How to overload operators
444(6)
An introduction to operator overloading
444(2)
How to overload arithmetic operators
446(2)
How to overload relational operators
448(2)
An enhanced version of the Product Maintenance application
450(6)
The code for the ProductList class
450(4)
The code for the Product Maintenance form
454(2)
Perspective
456(4)
Chapter 14 How To Work With Inheritance
An introduction to inheritance
460(8)
How inheritance works
460(2)
How NET uses inheritance
462(2)
Methods inherited from the System.Object class
464(2)
How to use inheritance in your applications
466(2)
Basic skills for working with inheritance
468(6)
How to create a base class
468(2)
How to create a subclass
470(2)
How polymorphism works
472(2)
An inheritance version of the Product Maintenance application
474(10)
The operation of the Product Maintenance application
474(2)
The code for the Product, Book, and Software classes
476(2)
The code for the ProductList class
478(2)
The code for the Product Maintenance form
480(2)
The code for the New Product form
482(2)
Object types and casting
484(4)
How to use the Type class to get information about an object's type
484(2)
How to use casting with inheritance
486(2)
How to work with abstract and sealed classes
488(4)
How to work with abstract classes
488(2)
How to work with sealed classes
490(2)
Perspective
492(4)
Chapter 15 How To Work With Interfaces And Generics
How to work with interfaces
496(14)
An introduction to interfaces
496(2)
Some of the interfaces defined by NET
498(2)
How to create an interface
500(2)
How to implement an interface
502(2)
A Product class that implements the ICloneable interface
504(2)
How to use an interface as a parameter
506(2)
How to work with default methods
508(1)
How to work with static methods and fields
508(2)
How to work with generics
510(14)
How to code a class that defines a generic collection
510(4)
Some of the generic interfaces defined by NET
514(2)
How to implement the IComparableo<> interface
516(2)
How to use constraints
518(2)
How to implement the IEnumerable<> interface
520(2)
How to code an interface that uses generics
522(2)
Perspective
524(4)
Chapter 16 How To Organize, Document, And Test Your Classes
How to organize your classes
528(6)
How to code multiple classes in a single file
528(2)
How to split a single class across multiple files
530(2)
How to work with namespaces
532(2)
How to document your classes
534(4)
How to add XML documentation to a class
534(2)
How to view the XML documentation
536(2)
How to create and use class libraries
538(6)
How class libraries work
538(2)
How to create a class library project
540(2)
How to add a reference to a class library
542(1)
How to use the classes in a class library
542(2)
How to implement unit testing
544(8)
How unit testing works
544(2)
How to create a unit test project
546(2)
How to code unit tests
548(2)
How to run unit tests
550(2)
Perspective
552(6)
Section 4 Basic skills for working with data
Chapter 17 How To Work With File I/O
An introduction to the System.IO classes
558(8)
The classes for managing directories, files, and paths
558(2)
How files and streams work
560(2)
How to use the FileStream class
562(2)
How to use the exception classes for file I/O
564(2)
How to work with text files
566(8)
How to write a text file
566(2)
How to read a text file
568(2)
How to use the using statement and the using declaration
570(2)
A class that works with a text file
572(2)
How to work with binary files
574(6)
How to write a binary file
574(2)
How to read a binary file
576(2)
A class that works with a binary file
578(2)
Perspective
580(2)
Chapter 18 How To Use Linq
Basic concepts for working with LINQ
582(4)
How LINQ is implemented
582(1)
Advantages of using LINQ
582(2)
The three stages of a query operation
584(2)
How to code query expressions
586(10)
How to identify the data source for a query
586(2)
How to filter the results of a query
588(2)
How to sort the results of a query
590(2)
How to select fields from a query
592(2)
How to join data from two or more data sources
594(2)
How to use extension methods and lambda expressions
596(8)
How extension methods work
596(2)
How lambda expressions work
598(2)
How to code method-based queries
600(2)
How to use additional LINQ methods
602(2)
A Customer Invoice application that uses generic lists
604(4)
The user interface
604(2)
The code for the form
606(2)
Perspective
608(6)
Section 5 Database programming
Chapter 19 An Introduction To Database Programming
An introduction to client/server systems
614(4)
The hardware components of a client/server system
614(2)
The software components of a client/server system
616(2)
An introduction to relational databases
618(8)
How a table is organized
618(2)
How the tables in a database are related
620(2)
How the columns in a table are defined
622(2)
The design of the MMABooks database
624(2)
How to use SQL to work with a relational database
626(6)
How to query a single table
626(2)
How to join data from two or more tables
628(2)
How to add, update, and delete data in a table
630(2)
Perspective
632(2)
Chapter 20 How To Use Entity Framework Core
How to create an Entity Data Model
634(16)
How Entity Framework Core works
634(2)
How to add EF Core to your project
636(2)
How to generate DB context and entity classes
638(2)
The Entity Data Model for the MMABooks database
640(2)
The code for the DB context class
642(4)
The code for the Customers entity class
646(2)
How to modify the generated code
648(2)
How to use LINQ to Entities
650(6)
How to retrieve data
650(2)
How to load related objects
652(2)
How to enable lazy loading
654(2)
How to use EF to modify a database
656(10)
How to insert, update, and delete data
656(2)
How to handle database exceptions
658(2)
How concurrency affects insert, update, and delete operations
660(2)
How to check for concurrency conflicts
662(2)
How to handle concurrency exceptions
664(2)
How to bind controls
666(2)
How to bind controls to an entity collection
666(1)
How to bind controls to the results of a query
666(2)
The Customer Maintenance application
668(14)
The user interface
668(2)
The code for the Customer Maintenance form
670(8)
The code for the Add/Modify Customer form
678(4)
Perspective
682(6)
Chapter 21 How To Use Ado.Net To Write Your Own Data Access Code
An introduction to ADO.NET
688(4)
The NET data providers
688(2)
How the connection, command, and data reader objects work
690(2)
How to work with connections and commands
692(4)
How to create and work with connections
692(2)
How to create and work with commands
694(2)
How to create and work with parameters
696(6)
How to use parameters in SQL statements
696(2)
How to create parameters
698(2)
How to work with parameters
700(2)
How to execute commands
702(4)
How to create and work with a data reader
702(2)
How to execute queries that return a single value
704(1)
How to execute action queries
704(2)
The Customer Maintenance application
706(18)
The user interface
706(2)
The class diagram for the business and database classes
708(2)
The code for the MMABooksDB class
710(1)
The code for the CustomerDB class
710(6)
The code for the StateDB class
716(2)
The code for the Customer Maintenance form
718(6)
Perspective
724(4)
Chapter 22 How To Use The Datagridview Control
How to display data in a DataGridView control
728(10)
An introduction to the DataGridView control
728(2)
How to set the functions provided by a DataGridView control
730(2)
How to bind to a data source
732(2)
How to format the columns
734(2)
How to format the headers and alternating rows
736(2)
How to work with columns and events
738(4)
How to add and remove columns
738(2)
How to work with the object that's passed to an event handler
740(2)
A Product Maintenance application
742(6)
The user interface
742(2)
The code for the Product Maintenance form
744(4)
How to provide paging for a DataGridView control
748(8)
The user interface for a form that provides for paging
748(2)
The code for the form
750(6)
How to create a Master/Detail form
756(4)
The user interface for a Master/Detail form
756(2)
The code for the form
758(2)
Perspective
760(6)
Appendix A How to set up Windows for this book
How to install the files for this book
766(2)
How to install Visual Studio
768(2)
How to set up your system to use the database
770