Atjaunināt sīkdatņu piekrišanu

E-grāmata: Microsoft Visual C# Step by Step

4.18/5 (66 ratings by Goodreads)
  • Formāts: 832 pages
  • Sērija : Developer Reference
  • Izdošanas datums: 16-Feb-2022
  • Izdevniecība: Addison Wesley
  • Valoda: eng
  • ISBN-13: 9780137619962
Citas grāmatas par šo tēmu:
  • Formāts - EPUB+DRM
  • Cena: 45,07 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.
  • Formāts: 832 pages
  • Sērija : Developer Reference
  • Izdošanas datums: 16-Feb-2022
  • Izdevniecība: Addison Wesley
  • Valoda: eng
  • ISBN-13: 9780137619962
Citas grāmatas par šo tēmu:

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

A hands-on guide to the fundamentals of programming with the latest version of Visual C# using Visual Studio 2022, covering such topics as variables, operators, expressions, methods, decision and iteration statements, and new app templates.

A hands-on guide to the fundamentals of programming with the latest version of Visual C# using Visual Studion 2022, covering such topics as variables, operators, expressions, methods, decision and iteration statements, and new app templates.

Your hands-on guide to Visual C# fundamentals with Visual Studio 2022


Expand your expertise—and teach yourself the fundamentals of programming the latest version of Visual C# with Visual Studio 2022. This book provides software developers all the guidance, exercises, and code needed to start building responsive, scalable, cloud-connected applications that can run almost anywhere.


Discover how to:


  • Quickly start creating Visual C# code and projects with Visual Studio
  • Work with variables, operators, expressions, methods, and program flow
  • Build more robust apps with error, exception, and resource management
  • Spot problems fast with the integrated Visual Studio 2022 debugger
  • Master new default interface methods, static local functions, async disposable types, and other enhancements
  • Make the most of the C# object model, and create functional data structures
  • Leverage advanced properties, indexers, generics, and collection classes
  • Create Windows 11 apps that share data, collaborate, and use cloud services
  • Use lightweight records to build immutable reference types more easily
  • Perform complex queries over object collections with LINQ
  • Improve application throughput and response time with asynchronous methods
  • Use delegates and decoupling to construct highly extensible systems
  • Customize C# operator behavior over your own classes and structures
  • Implement the powerful Model-View-ViewModel (MVVM) pattern
  • Build UWP applications that retrieve complex data and present it intuitively

Acknowledgments xxi
About the author xxiii
Introduction xxv
PART I INTRODUCING MICROSOFT VISUAL C# AND MICROSOFT VISUAL STUDIO 2022
Chapter 1 Welcome to C#
3(42)
Writing your first C# program
3(6)
Beginning programming with the Visual Studio 2022 environment
9(5)
Writing your first program using Visual Studio 2022
14(7)
Using namespaces
21(2)
Namespaces and assemblies
23(1)
Commenting code
24(1)
Creating a graphical application
24(13)
Examining the Universal Windows Platform app
37(3)
Adding code to the graphical application
40(3)
Summary
43(1)
Quick Reference
44(1)
Chapter 2 Working with variables, operators, and expressions
45(28)
Understanding statements
45(1)
Using identifiers
46(1)
Identifying keywords
46(2)
Using variables
48(1)
Naming variables
48(1)
Declaring variables
48(1)
Specifying numeric values
49(1)
Working with primitive data types
50(1)
Unassigned local variables
51(1)
Displaying primitive data type values
51(8)
Using arithmetic operators
59(1)
Operators and types
59(2)
Examining arithmetic operators
61(6)
Controlling precedence
67(1)
Using associativity to evaluate expressions
68(1)
Associativity and the assignment operator
68(1)
Incrementing and decrementing variables
69(1)
Prefix and postfix
70(1)
Declaring implicitly typed local variables
70(1)
Summary
71(1)
Quick Reference
72(1)
Chapter 3 Writing methods and applying scope
73(38)
Creating methods
73(1)
Declaring a method
74(1)
Returning data from a method
75(1)
Using expression-bodied methods
76(1)
Calling methods
77(1)
Specifying the method call syntax
77(3)
Returning multiple values from a method
80(2)
Applying scope
82(1)
Defining local scope
83(1)
Defining class scope
83(1)
Overloading methods
84(1)
Writing methods
85(4)
Using the Visual Studio Debugger to step through methods
89(7)
Refactoring code
96(1)
Nesting methods
97(3)
Using optional parameters and named arguments
100(2)
Defining optional parameters
102(1)
Passing named arguments
102(1)
Resolving ambiguities with optional parameters and named arguments
103(5)
Summary
108(1)
Quick reference
109(2)
Chapter 4 Using decision statements
111(22)
Declaring Boolean variables
111(1)
Using Boolean operators
112(1)
Understanding equality and relational operators
112(1)
Understanding conditional logical operators
113(1)
Short-circuiting
114(1)
Summarizing operator precedence and associativity
114(1)
Pattern matching
115(1)
Using if statements to make decisions
116(1)
Understanding if statement syntax
116(1)
Using blocks to group statements
117(1)
Cascading if statements
118(6)
Using switch statements
124(1)
Understanding switch statement syntax
124(1)
Following the switch statement rules
125(4)
Using switch expressions with pattern matching
129(2)
Summary
131(1)
Quick reference
132(1)
Chapter 5 Using compound assignment and iteration statements
133(20)
Using compound assignment operators
133(2)
Writing while statements
135(5)
Writing for statements
140(2)
Writing do statements
142(9)
Summary
151(1)
Quick reference
151(2)
Chapter 6 Managing errors and exceptions
153(28)
Trying code and catching exceptions
154(1)
Unhandled exceptions
155(1)
Using multiple catch handlers
156(1)
Catching multiple exceptions
157(1)
Filtering exceptions
158(5)
Propagating exceptions
163(2)
Using checked and unchecked integer arithmetic
165(1)
Writing checked statements
166(1)
Writing checked expressions
166(4)
Throwing exceptions
170(4)
Using throw expressions
174(1)
Using a finally block
175(1)
Summary
176(1)
Quick reference
177(4)
PART II UNDERSTANDING THE C# OBJECT MODEL
Chapter 7 Creating and managing classes and objects
181(24)
Understanding classification
181(1)
The purpose of encapsulation
182(1)
Defining and using a class
182(2)
Controlling accessibility
184(2)
Working with constructors
186(1)
Overloading constructors
187(9)
Deconstructing an object
196(1)
Understanding static methods and data
197(1)
Creating a shared field
198(1)
Creating a static field by using the const keyword
199(1)
Understanding static classes
199(1)
Static using statements
200(2)
Anonymous classes
202(1)
Summary
203(1)
Quick reference
204(1)
Chapter 8 Understanding values and references
205(26)
Copying value type variables and classes
205(6)
Understanding null values and nullable types
211(1)
The null-conditional and null-coalescing operators
212(1)
Using nullable types
213(1)
Understanding the properties of nullable types
214(1)
Using ref and out parameters
215(1)
Creating ref parameters
216(1)
Creating out parameters
216(3)
How computer memory is organized
219(1)
Using the stack and the heap
220(1)
The System.Object class
221(1)
Boxing
222(1)
Unboxing
222(2)
Casting data safely
224(1)
The is operator
224(1)
The as operator
225(1)
The switch statement revisited
225(4)
Summary
229(1)
Quick reference
229(2)
Chapter 9 Creating value types with enumerations and structures
231(20)
Working with enumerations
231(1)
Declaring an enumeration
231(1)
Using an enumeration
232(1)
Choosing enumeration literal values
233(1)
Choosing an enumeration's underlying type
233(3)
Working with structures
236(1)
Declaring a structure
237(1)
Understanding differences between structures and classes
238(2)
Declaring structure variables
240(1)
Understanding structure initialization
240(5)
Copying structure variables
245(3)
Summary
248(1)
Quick reference
249(2)
Chapter 10 Using arrays
251(26)
Declaring array variables
252(1)
Creating an array instance
252(1)
Populating and using an array
253(1)
Creating an implicitly typed array
254(1)
Accessing an individual array element
255(1)
Accessing a series of array elements
255(1)
Iterating through an array
256(1)
Passing arrays as parameters or return values for a method
257(2)
Copying arrays
259(1)
Using multidimensional arrays
260(1)
Creating jagged arrays
261(11)
Accessing arrays that contain value types
272(3)
Summary
275(1)
Quick reference
275(2)
Chapter 11 Understanding parameter arrays
277(12)
Overloading: a recap
277(1)
Using array arguments
278(1)
Declaring a params array
279(2)
Using params object[ ]
281(2)
Using a params array
283(3)
Comparing parameter arrays and optional parameters
286(2)
Summary
288(1)
Quick reference
288(1)
Chapter 12 Working with inheritance
289(22)
What is inheritance?
289(1)
Using inheritance
290(2)
The System.Object class revisited
292(1)
Calling base-class constructors
292(1)
Assigning classes
293(2)
Declaring new methods
295(1)
Declaring virtual methods
296(1)
Declaring override methods
297(3)
Understanding protected access
300(5)
Creating extension methods
305(4)
Summary
309(1)
Quick reference
310(1)
Chapter 13 Creating interfaces and defining abstract classes
311(28)
Understanding interfaces
311(1)
Defining an interface
312(1)
Implementing an interface
313(1)
Referencing a class through its interface
314(1)
Working with multiple interfaces
315(1)
Explicitly implementing an interface
316(2)
Handling versioning with interfaces
318(1)
Interface restrictions
319(1)
Defining and using interfaces
320(9)
Abstract classes
329(1)
Abstract methods
330(1)
Sealed classes
330(1)
Sealed methods
331(1)
Implementing and using an abstract class
331(6)
Summary
337(1)
Quick reference
338(1)
Chapter 14 Using garbage collection and resource management
339(26)
The life and times of an object
339(1)
Writing finalizers
340(3)
Why use the garbage collector?
343(1)
How does the garbage collector work?
344(1)
Recommendations
345(1)
Resource management
345(1)
Disposal methods
346(1)
Exception-safe disposal
346(1)
The using statement and the IDisposable interface
347(2)
Calling the Dispose method from a finalizer
349(2)
Implementing exception-safe disposal
351(8)
Handling asynchronous disposal
359(2)
Summary
361(1)
Quick reference
361(4)
PART III UNDERSTANDING THE C# OBJECT MODEL
Chapter 15 Implementing properties to access fields
365(30)
Implementing encapsulation by using methods
366(1)
What are properties?
367(3)
Using properties
370(1)
Read-only properties
371(1)
Write-only properties
371(1)
Property accessibility
372(1)
Understanding property restrictions
373(2)
Declaring interface properties
375(1)
Replacing methods with properties
376(4)
Pattern-matching with properties
380(1)
Generating automatic properties
381(2)
Initializing objects by using properties
383(2)
Automatic properties and immutability
385(3)
Using records with properties to implement lightweight structures
388(4)
Summary
392(1)
Quick reference
393(2)
Chapter 16 Handling binary data and using indexers
395(18)
What is an indexer?
395(1)
Storing binary values
396(1)
Displaying binary values
397(1)
Manipulating binary values
397(1)
Solving the same problems using indexers
398(2)
Understanding indexer accessors
400(1)
Comparing indexers and arrays
401(2)
Indexers in interfaces
403(1)
Using indexers in a Windows application
404(6)
Summary
410(1)
Quick reference
410(3)
Chapter 17 Introducing generics
413(32)
The problem: Issues with the object type
413(4)
The generics solution
417(2)
Generics vs. generalized classes
419(1)
Generics and constraints
419(1)
Creating a generic class
420(1)
The theory of binary trees
420(3)
Building a binary tree class by using generics
423(10)
Creating a generic method
433(1)
Defining a generic method to build a binary tree
434(4)
Variance and generic interfaces
438(2)
Covariant interfaces
440(1)
Contravariant interfaces
441(3)
Summary
444(1)
Quick reference
444(1)
Chapter 18 Using collections
445(24)
What are collection classes?
445(2)
The List<T> collection class
447(2)
The LinkedList<T> collection class
449(1)
The Queue<T> collection class
450(1)
The PriorityQueue<TEIement, TPriority> collection class
451(1)
The Stack<T> collection class
452(1)
The Dictionary<TKey, TValue> collection class
453(1)
The SortedList<TKey, TValue> collection class
454(1)
The HashSet<T> collection class
455(2)
Using collection initializers
457(1)
Find methods, predicates, and lambda expressions
458(2)
The forms of lambda expressions
460(1)
Lambda expressions and anonymous methods
461(1)
Comparing arrays and collections
462(4)
Summary
466(1)
Quick reference
467(2)
Chapter 19 Enumerating collections
469(14)
Enumerating the elements in a collection
469(1)
Manually implementing an enumerator
470(5)
Implementing the Enumerable interface
475(2)
Implementing an enumerator by using an iterator
477(1)
A simple iterator
478(1)
Defining an enumerator for the Tree<TItem> class by using an iterator
479(3)
Summary
482(1)
Quick reference
482(1)
Chapter 20 Decoupling application logic and handling events
483(30)
Understanding delegates
484(1)
Examples of delegates in the .NET class library
485(2)
The automated factory scenario
487(3)
Declaring and using delegates
490(9)
Lambda expressions and delegates
499(1)
Enabling notifications by using events
500(1)
Declaring an event
501(1)
Subscribing to an event
502(1)
Unsubscribing from an event
502(1)
Raising an event
502(1)
Understanding user-interface events
503(1)
Using events
504(6)
Summary
510(1)
Quick reference
511(2)
Chapter 21 Querying in-memory data by using query expressions
513(24)
What is LINQ?
513(1)
Using LINQ in a C# application
514(2)
Selecting data
516(2)
Filtering data
518(1)
Ordering, grouping, and aggregating data
519(2)
Joining data
521(1)
Using query operators
522(3)
Querying data in Tree<TItem> objects
525(5)
LINQ and deferred evaluation
530(4)
Summary
534(1)
Quick reference
534(3)
Chapter 22 Operator overloading
537(22)
Understanding operators
537(1)
Operator constraints
538(1)
Overloaded operators
539(1)
Creating symmetric operators
540(1)
Understanding compound assignment evaluation
541(1)
Declaring increment and decrement operators
542(1)
Comparing operators in structures and classes
542(1)
Defining operator pairs
543(1)
Implementing operators
544(3)
Overriding the equality operators
547(3)
Understanding conversion operators
550(1)
Providing built-in conversions
551(1)
Implementing user-defined conversion operators
552(1)
Creating symmetric operators, revisited
553(1)
Writing conversion operators
553(2)
Summary
555(1)
Quick reference
556(3)
PART IV BUILDING UNIVERSAL WINDOWS PLATFORM APPLICATIONS WITH C#
Chapter 23 Improving throughput by using tasks
559(40)
Why perform multitasking by using parallel processing?
559(1)
The rise of the multicore processor
560(1)
Implementing multitasking by using Microsoft NET
561(1)
Tasks, threads, and the ThreadPool
562(1)
Creating, running, and controlling tasks
563(3)
Using the Task class to implement parallelism
566(10)
Abstracting tasks by using the Parallel class
576(4)
When not to use the Parallel class
580(2)
Canceling tasks and handling exceptions
582(1)
The mechanics of cooperative cancellation
582(12)
Handling task exceptions by using the AggregateException class
594(2)
Using continuations with canceled and faulted tasks
596(1)
Summary
596(1)
Quick reference
597(2)
Chapter 24 Improving response time by performing asynchronous operations
599(42)
Implementing asynchronous methods
600(1)
Defining asynchronous methods: the problem
600(3)
Defining asynchronous methods: the solution
603(6)
Defining asynchronous methods that return values
609(1)
Asynchronous method pitfalls
610(1)
Asynchronous methods and the Windows Runtime APIs
611(2)
Tasks, memory allocation, and efficiency
613(3)
Using PLINQ to parallelize declarative data access
616(1)
Using PLINQ to improve performance while iterating through a collection
616(5)
Canceling a PLINQ query
621(1)
Synchronizing concurrent access to data
621(4)
Locking data
625(1)
Synchronization primitives for coordinating tasks
625(2)
Canceling synchronization
627(1)
The concurrent collection classes
628(1)
Using a concurrent collection and a lock to implement thread-safe data access
629(10)
Summary
639(1)
Quick reference
639(2)
Chapter 25 Implementing the user interface for a Universal Windows Platform app
641(46)
Features of a Universal Windows Platform app
643(2)
Using the Blank App template to build a Universal Windows Platform app
645(4)
Implementing a scalable user interface
649(10)
Implementing a tabular layout by using a Grid control
659(8)
Adapting the layout by using the Visual State Manager
667(7)
Applying styles to a UI
674(11)
Summary
685(1)
Quick reference
686(1)
Chapter 26 Displaying and searching for data in a Universal Windows Platform app
687(30)
Implementing the Model-View-ViewModel pattern
687(1)
Displaying data by using data binding
688(6)
Modifying data by using data binding
694(5)
Using data binding with a ComboBox control
699(3)
Creating a ViewModel
702(4)
Adding commands to a ViewModel
706(9)
Summary
715(1)
Quick reference
716(1)
Chapter 27 Accessing a remote database from a Universal Windows Platform app
717(54)
Retrieving data from a database
717(11)
Creating an entity model
728(7)
Creating and using a REST web service
735(17)
Updating the UWP application to use the web service
752(9)
Searching for data in the Customers app
761(6)
Inserting, updating, and deleting data through a REST web service
767(2)
Summary
769(1)
Quick reference
770(1)
Index 771
John Sharp is a principal technologist for CM Group Ltd, part of the Civica Group, a software development and consultancy company in the United Kingdom. He is well versed as a software consultant, developer, author, and trainer, with more than 35 years of experience, ranging from Pascal programming on CP/M and C/Oracle application development on various flavors of UNIX to the design of C# and JavaScript distributed applications and development on Windows 11 and Microsoft Azure. He also spends much of his time writing courseware for Microsoft, focusing on areas such as data science using R and Python, big data processing with Spark and CosmosDB, SQL Server, NoSQL, web services, Blazor, cross-platform development with frameworks such as Xamarin and MAUI, and scalable application architectures with Azure.