Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn C# Programming

You're reading from   Learn C# Programming A guide to building a solid foundation in C# language for writing efficient programs

Arrow left icon
Product type Paperback
Published in Apr 2020
Publisher Packt
ISBN-13 9781789805864
Length 636 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Raffaele Rialdi Raffaele Rialdi
Author Profile Icon Raffaele Rialdi
Raffaele Rialdi
Ankit Sharma Ankit Sharma
Author Profile Icon Ankit Sharma
Ankit Sharma
Prakash Tripathi Prakash Tripathi
Author Profile Icon Prakash Tripathi
Prakash Tripathi
Marius Bancila Marius Bancila
Author Profile Icon Marius Bancila
Marius Bancila
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Chapter 1: Starting with the Building Blocks of C# 2. Chapter 2: Data Types and Operators FREE CHAPTER 3. Chapter 3: Control Statements and Exceptions 4. Chapter 4: Understanding the Various User-Defined Types 5. Chapter 5: Object-Oriented Programming in C# 6. Chapter 6: Generics 7. Chapter 7: Collections 8. Chapter 8: Advanced Topics 9. Chapter 9: Resource Management 10. Chapter 10: Lambdas, LINQ, and Functional Programming 11. Chapter 11: Reflection and Dynamic Programming 12. Chapter 12: Multithreading and Asynchronous Programming 13. Chapter 13: Files, Streams, and Serialization 14. Chapter 14: Error Handling 15. Chapter 15: New Features of C# 8 16. Chapter 16: C# in Action with .NET Core 3 17. Chapter 17: Unit Testing 18. Assessments 19. Other Books You May Enjoy

Preface

C# is a general-purpose, multi-paradigm programming language that combines object-oriented, imperative, generic, functional, declarative, and dynamic programming. Soon after its release, C# became one of the top choices for developers for writing a large variety of types of applications. Although it is not the only language targeting the CLI (the others include VB.NET and F#), it is the primary choice for writing .NET applications for desktop, web, cloud, and mobile platforms.

Over the years, the language has evolved gradually but steadily. Although initially it was an object-oriented programming language, new versions have opened up the language to new paradigms such as generic, functional, and dynamic programming. New language features and more concise syntax have also been added regularly. With its release as an open source project of the .NET Compiler Platform, also known as Roslyn, which is a set of compilers and code analysis APIs for C# and VB.NET, the language has entered a new open era with the community deeply involved in the development of the language.

The current version of the language is known as C# 8. This was released in September 2019 for .NET Core 3.0 and requires Visual Studio 2019 16.3 or a newer version. C# 8 can also be used with .NET Framework, although not all features are available. That is because they required runtime changes, which was something Microsoft did not want to do due to its intent to no longer invest in .NET Framework (other than long-time support) and turn .NET Core into the one framework used to target all platforms and types of applications. This framework will be known simply as .NET.

This book is designed to help you learn the language from scratch and eventually master all its multi-paradigm programming aspects. We start with the very basics: data types, statements, and other building blocks. We then continue with object-oriented concepts such as classes, interfaces, inheritance, and polymorphism. We cover generics, functional programming and LINQ, reflection and dynamic programming, and more advanced topics, such as resource management, pattern matching, concurrency and asynchronous programming, error handling, and serialization. Toward the end of the book, we give special attention to the new features introduced in C# 8. Last, but not least, we discuss unit testing and how you can write unit tests for your C# code. At the end of each chapter, we provide you with a set of questions to help you assess what you learned in that chapter.

The book contains many code snippets that are designed to help you easily understand and learn all the language features. All of them are available in the source code that accompanies the book. You will need either Visual Studio or Visual Studio Code to try them. Alternatively, you can use an online compiler, the primary choice in this case being https://sharplab.io/.

lock icon The rest of the chapter is locked
Next Section arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image