Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals
  • Table Of Contents Toc
C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals

C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals - Tenth Edition

By : Mark J. Price
4.3 (12)
close
close
C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals

C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals

4.3 (12)
By: Mark J. Price

Overview of this book

C# and .NET continue to power modern cross-platform and enterprise development. With the release of C# 14 and .NET 10, developers gain access to a more capable, efficient, and future-ready platform for building websites, services, and applications across Windows, Linux, and macOS. This fully updated tenth edition takes a practical, hands-on approach. You’ll start with core C# and object-oriented programming concepts, then progress through building, testing, and debugging applications while working with .NET libraries, filesystems, serialization, and LINQ. The book covers key C# 14 enhancements—such as field modifiers, partial events, and instance constructors, explained through real-world examples. You’ll also build modern web solutions using ASP.NET Core 10, Blazor, and Minimal APIs, including support for native AOT compilation, making this book well suited for cloud-native, microservice, and container-based development. By the end of the book, you’ll be confident in building maintainable, high-performance websites and services aligned with modern .NET development practices.
Table of Contents (19 chapters)
close
close
18
Index

Casting within inheritance hierarchies

Casting between types is subtly different from converting between types. Casting is between similar types, like between a 16-bit integer and a 32-bit integer, or between a superclass and one of its subclasses. Converting is between dissimilar types, such as between text and a number.

For example, if you need to work with multiple types of stream, then instead of declaring specific types of stream, like MemoryStream or FileStream, you could declare an array of Stream, the supertype of MemoryStream and FileStream.

Implicit casting

In the previous example, you saw how an instance of a derived type can be stored in a variable of its base type (or its base’s base type, and so on). When we do this, it is called implicit casting.

Explicit casting

The opposite of implicit casting is explicit casting, and you must use parentheses around the type you want to cast into as a prefix to do it:

  1. In Program.cs, add a statement...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon