The book is divided into two parts. Part I covers the fundamentals and essentials of advanced programming in C#. You will be introduced to delegates and events and then move on to lambda expressions. Part II teaches you how to implement these features in different programming techniques, starting with generic programming. After that, you will learn about thread programming and asynchronous programming, to benefit from a multi-threaded environment. Finally, you will learn database programming using ADO.NET to connect to a MySQL database and you will know how to exercise SQL statements and stored procedures through your C# applications.
What You Will Learn
- Use delegates, events, and lambda expressions in advanced programming
- Make your application flexible by utilizing generics
- Create a fast application with multi-threading and asynchronous programming
- Work in Visual Studio Community Edition, which is the most common IDE for using C#
- Understand alternative implementations along with their pros and cons
Who This Book Is For
Developers and programmers who are already working in C#
- Verlag: Apress / Springer, Berlin
- Artikelnr. des Verlages: 978-1-4842-5933-7
- 1st ed.
- Seitenzahl: 424
- Erscheinungstermin: 26. Juni 2020
- Abmessung: 254mm x 178mm x 22mm
- Gewicht: 793g
- ISBN-13: 9781484259337
- ISBN-10: 1484259335
- Artikelnr.: 58802369
Chapter 1: Delegates
· What is a delegate?
· How to create and use delegates?
· What is a multicast delegate (Chaining of Delegates) and its uses?
· Adding and removing methods from a multicast delegate.
· Covariance and contravariance in non-generic delegates.
Chapter 2: Events
· Events overview
- Creation of events and example of simple events
- Subscribing single and multiple events
- Passing data to events
- Discussion on event accessors
Chapter 3: Anonymous Function and Lambda Exp.
· A quick introduction to anonymous function and lambda expression.
- Lambda's with and without parameters
- Types and scopes of a lambda expression Expression syntaxes with example
Chapter 4: LINQ
Chapter 5: Generic Programming
- Generics overview Comparing a generic program with its counterpart-a non-generic program
- Self-referenced generics
- Use of 'default' in a generic program How to put constraints in a generic program
- Covariance and contravariance in the context of a generic program
Chapter 6: Database Programming
· How to connect to a database
· Exercise simple queries to database and retrieving results from the database.
Chapter 7: Thread Programming
- Threads overview
- Different case studies with multithreaded programs
- Use of ParameterizedThreadStart delegate in a multithreaded environment
- Passing multiple parameters to a thread
- Discussion on Synchronization and deadlock with examples
Chapter 8: Asynchronous Programming
- Brief overview
- Different techniques to implement an asynchronous program(e.g. using async/await, thread, thread pool etc)
Chapter 9: Dynamic Programming
- DLR overview
- Dynamic type and its uses
- Dynamic type checking
- Runtime look up etc.