Professional Documents
Culture Documents
Full Download Visual Studio 2022 in Depth Ockert J Du Preez Ebook Online Full Chapter PDF
Full Download Visual Studio 2022 in Depth Ockert J Du Preez Ebook Online Full Chapter PDF
Preez
Visit to download the full and correct content document:
https://ebookmeta.com/product/visual-studio-2022-in-depth-ockert-j-du-preez/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...
https://ebookmeta.com/product/visual-studio-2019-in-depth-1st-
edition-preez-ockert-j-du/
https://ebookmeta.com/product/visual-studio-2022-succinctly-1st-
edition-alessandro-del-sole/
https://ebookmeta.com/product/art-the-sublime-and-movement-
spaced-out-1st-edition-amanda-du-preez/
https://ebookmeta.com/product/getting-started-with-visual-
studio-2022-learning-and-implementing-new-features-dirk-strauss/
Target C#: Simple Hands-On Programming with Visual
Studio 2022 1st Edition Gerard Byrne
https://ebookmeta.com/product/target-c-simple-hands-on-
programming-with-visual-studio-2022-1st-edition-gerard-byrne/
https://ebookmeta.com/product/visual-studio-for-mac-succinctly-
alessandro-del-sole/
https://ebookmeta.com/product/visual-studio-code-succinctly-1st-
edition-alessandro-del-sole/
https://ebookmeta.com/product/visual-studio-2015-succinctly-1st-
edition-alessandro-del-sole/
Visual Studio 2022
In-Depth
Second Edition
Ockert J. du Preez
www.bpbonline.com
Copyright © 2023 BPB Online
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor BPB
Online or its dealers and distributors, will be held liable for any damages caused or
alleged to have been caused directly or indirectly by this book.
BPB Online has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, BPB Online cannot guarantee the accuracy of this information.
ISBN 978-93-5551-246-8
www.bpbonline.com
Dedicated to
Elmarie
Michaela
Winton
Björn
About the Author
Ockert J. du Preez has been in the coding industry for 20+ years
and has written hundreds of developer articles over the years
detailing his programming quests and adventures. These can be
found on CodeGuru, Developer.com and Database Journal.
He knows a broad spectrum of development languages including:
C++, C#, VB.NET, JavaScript and HTML.
He has written the following books:
Visual Studio 2019 In-Depth (BpB Publications)
JavaScript for Gurus (BpB Publications)
Building Cross-Platform Modern Apps using Visual Studio Code
(VS Code)
High Performance Enterprise Apps using C# 10 and .NET 6.0
He was the Technical Editor for the following books
Professional C++, 5th Edition by Marc Gregoire
C++ Software Interoperability for Windows Programmers by
Adam Gladstone
He was a Microsoft Most Valuable Professional for .NET (2008–
2017).
Acknowledgement
I want to thank my family for all their support, their belief in me and
their never-ending support.
I wish to extend a special thank you for everyone at Cowboy Café
for bringing me coffee and allowing me to write this book in their
cozy atmosphere.
My gratitude also goes to the team at BPB Publications for their
patience and support in writing this book.
On another personal note: I’d like to thank everyone that never
believed in me and always said that I would amount to nothing,
without negativity, positivity never prospers.
Preface
This book peeks into every corner of the Visual Studio IDE and help
you get started with the latest 2022 version. Right from installation,
you’ll discover new areas within the tool, and also the optimal way to
use the features you may already know. You'll learn, for example,
how to extend Visual Studio with your own customizations, so that
you can make it perform the way you want. You will then explore
everything about .NET 6, Diagnose and debug applications and all
the Collaboration tools in Visual Studio 2022.You will learn about the
new AI IntelliCode, .NET MAUI and the C++ 20 features. Lastly you
will explore Visual Studio 2022 on different platforms such as Linux,
and macOS
The details are listed below.
Chapter 1 focuses on Installing Visual Studio 2022. It covers all the
options and Add-ons to install and explore the new Visual Studio
2022 features.
Chapter 2 focuses on all the new and exciting features of .NET 6.
Chapter 3 This chapter will cover the new and enhanced features in
the C# language.
Chapter 4 inspects the Visual Studio 2022 IDE and examine its
features and updates from previous versions of Visual Studio.
Chapter 5 in this chapter, we will explore the new AI IntelliCode
and its AI capabilities to cater for a better coding experience.
Chapter 6 discusses all the built-in tools in Visual Studio 2022. It
will describe their purpose as well as explain how to use them.
Chapter 7 In this chapter you will learn about the awesome
debugging tools Visual Studio 2022 has as well as their
innerworkings.
Chapter 8 Because the web is a completely different platform than
Desktop applications, you need special tools to help with styling and
bug fixing. Chapter 8 digs into tools dedicated to the ASP.NET
environment.
Chapter 9 explains the need for simulators, emulators and tools
that help with creating beautiful responsive mobile apps for any
market.
Chapter 10 In the world of Cloud Computing, Visual Studio 2022
provides the best tools for working with Microsoft Azure. Chapter 10
explores Azure tools and more.
Chapter 11 Visual Studio 2022 includes support for C++ 20,
Chapter explores some of its new features.
APPENDIX A This covers Cross-Platform applications in Visual
Studio 2022 as well as Visual Studio for Mac features.
Code Bundle and Coloured
Images
Please follow the link to download the
Code Bundle and the Coloured Images of the book:
https://rebrand.ly/8b48fd
The code bundle for the book is also hosted on GitHub at
https://github.com/bpbpublications/Visual-Studio-2022-
In-Depth-2nd-Edition. In case there's an update to the code, it
will be updated on the existing GitHub repository.
We have code bundles from our rich catalogue of books and videos
available at https://github.com/bpbpublications. Check them
out!
Errata
We take immense pride in our work at BPB Publications and follow
best practices to ensure the accuracy of our content to provide with
an indulging reading experience to our subscribers. Our readers are
our mirrors, and we use their inputs to reflect and improve upon
human errors, if any, that may have occurred during the publishing
processes involved. To let us maintain the quality and help us reach
out to any readers who might be having difficulties due to any
unforeseen errors, please write to us at :
errata@bpbonline.com
Your support, suggestions and feedbacks are highly appreciated by
the BPB Publications’ Family.
Did you know that BPB offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade
to the eBook version at www.bpbonline.com and as a print
book customer, you are entitled to a discount on the eBook
copy. Get in touch with us at: business@bpbonline.com for
more details.
At www.bpbonline.com, you can also read a collection of
free technical articles, sign up for a range of free newsletters,
and receive exclusive discounts and offers on BPB books and
eBooks.
Piracy
If you come across any illegal copies of our works in any form
on the internet, we would be grateful if you would provide us
with the location address or website name. Please contact us
at business@bpbonline.com with a link to the material.
Reviews
Please leave a review. Once you have read and used this book,
why not leave a review on the site that you purchased it from?
Potential readers can then see and use your unbiased opinion
to make purchase decisions. We at BPB can understand what
you think about our products, and our authors can see your
feedback on their book. Thank you!
For more information about BPB, please visit
www.bpbonline.com.
Table of Contents
Section - I: Getting to Know the Visual Studio
2022 IDE
Introduction
5. AI IntelliCode
Structure
Objectives
IntelliSense
Template IntelliSense improvements in C++
Peek Window UI and live edits
Nested template support
Default argument watermarks
AI IntelliCode
Advantages of using IntelliCode
Assisted IntelliSense
Recommendations for types, based on code
Inferring code style and formatting conventions
Finding issues faster
Focused code reviews
Team completions
Train models for team completions
Argument completion
Style and formatting conventions
EditorConfig
Conclusion
Key Topics
Points to remember
Questions
Answers
9. Mobile Tools
Structure
Objectives
JSON
JSON structure
JSON Schemas
Combining multiple subschemas
allOf
anyOf
oneOf
not
Complex schemas
Xamarin
Installing Xamarin
Xamarin.Forms
Creating a Xamarin.Forms App
.NET MAUI
Emulators and simulators
Differences between simulators or emulators to test apps
Visual Studio 2022 Android Emulator
Setting up a new device
Conclusion
Key topics
Points to remember
Questions
Appendix 'A'
Introduction
Structure
Objectives
Cross-platform applications
CMake
WSL
Grep
Sed
Awk
Visual Studio for Mac
Conclusion
Index
Section - I
Getting to Know the Visual
Studio 2022 IDE
Introduction
In the Getting Started section, we will discover all the installation
options as well as learn how to install Visual Studio 2022 to suit our
needs. We will have a look at the Integrated Development
Environment (IDE) and all its associated windows. In Chapter 2,
Having a look at .NET 6, we will learn about the new features of
.NET 6, it’s history and the .NET 6 enhancements. Next, in Chapter
3, C# 9 Language & Coding Changes, we will have a look at
Intellisense and how it can save us hundreds of keystrokes while
writing a big program. Finally, we look at the language changes in
C# 9.0 and .NET Core 3.0.
This section will have the following chapters:
Chapter 1 – Getting Started with Visual Studio
Chapter 2 – Having a look at .NET 6
Chapter 3 - C# 9 Language & Coding Changes
Chapter 4 – Digging in the Visual Studio 2022
CHAPTER 1
Getting Started with Visual Studio
2022
T he first version of Visual Studio was released in 1997, and it was the
first time all Microsoft’s programming tools were integrated into one
common IDE. Now, more than 20 years later, the technology landscape
has changed tremendously, and Visual Studio has adapted continuously
with it. Therefore, Visual Studio 2022 includes the best and newest
tools to work with modern-day problems and technologies.
This chapter focuses on Installing Visual Studio 2022. It covers all the
options and Add-ons to install and explore the new Visual Studio 2022
features including DevOps, IntelliCode, new Debugging windows
updates, new Open Windows and many more!
Structure
In this chapter, we will cover the following topics:
Why Visual Studio 2022?
New features of Visual Studio
Requirements and prerequisites
Visual Studio 2022 editions
Installation options
Choose what to install
Launching Visual Studio 2022
Objectives
After reading this chapter the reader will understand how to install
Visual Studio 2022. We will explore the various windows inside Visual
Studio 2022. We will also look at the history of Visual Studio and
explore some of its great features.
Inside the Properties window we can also add the event handlers for
the controls on the Form or web page, or mobile screen. Please take a
look at the following screenshot:
Each object has different events, and our job as developers would be to
program these events to suit our purpose. In the preceding image we
will notice that Load has an event. This event is named Form1_Load.
The naming convention of an event is: ObjectName_EventName. The
specific event’s name gets added to the Object’s name. This makes it
easy for us to identify and search for certain events when the need
arises.
Specify the location of the obtained data. On the next screen specify
the table name, Stored Procedure name or query name which will fetch
the data or contains the data. After a Data Source is added we can use
it throughout our Windows form, web page or mobile screen.
β. Annularia.
In 1820 this generic name was applied by Sternberg[656] to some
specimens of branches bearing verticils of linear leaves. In 1828
Brongniart[657] thus defined the genus Annularia:—“Slender stem,
articulated, with opposite branches arising above the leaves. Leaves
verticillate, flat, frequently obtuse, traversed by a single vein, fused
basally and of unequal length.”
In the works of earlier writers we find frequent illustrations of
specimens of Annularia, which are compared with Asters and other
recent flowering plants. Lehmann[658] contributed a paper to the
Royal Academy of Berlin in 1756, in which he referred to certain
fossil plants as probable examples of flowers, among them being a
specimen of Annularia. He refers to the occurrence of fossil ferns
and other plants, and asks why we do not find flowers of the rose or
tulip; his object being “not to acquire vain glory, but to give occasion
for others to look into the matter more clearly.”
The general habit of the fossils which are now included under
Annularia agrees closely with that of Calamocladus. There is the
same spreading form and a similar foliage in the two genera, but in
Annularia the members of a whorl are always fused into a basal
sheath, and the segments are not of equal length. We may thus
summarise the characteristic features of the genus:—
Opposite branches are given off in one plane from the nodes of a
main axis; the leaves are in the form of narrow sheaths divided into
numerous and unequal linear or narrow lanceolate segments, each
with a median vein. The segments in each whorl appear to be
spread out in one plane very oblique to the axis of a branch, instead
of spreading radially in all directions; the lateral segments are usually
longer than the upper and lower members of a whorl. The vegetative
branches possess the same type of structure as Calamites.
A comparison of Annularia and Phyllotheca has already been
made in Chapter IX. (p. 282). Potonié[659] has recently given a
detailed account of Annularian leaves; he compares them with those
of Equisetum, and describes the occurrence on the lamina of each
leaf-segment of a broad central band or midrib, with a groove,
probably containing stomata, on either side. He shows that in well-
preserved specimens of Annularia, it is possible to recognise certain
minute surface-features, such as the presence of hairs and stomata,
which enable one to detect a close resemblance between the leaves
of Calamite stems and those of Annularian shoots.
It is not always easy to distinguish between Annularia and
Calamocladus; the collar-like basal sheath in the leaves of the
former is a characteristic feature, but that cannot always be
recognised. On the other hand, the leaves of Calamocladus may
sometimes be flattened out on the surface of the rock and simulate
the deeply cut sheaths of Annularia. It is difficult to decide how far
the manner of occurrence of Annularian leaves in one plane, which
is commonly insisted on as a generic character, is an original
feature, or how far it is the result of compression in fossilisation.
Probably the leaves of a living Annularia were spread out at right
angles to the axis, as in the ‘verticils’ of such a plant as Galium.
Dawson[660] has described some fossils from the Devonian rocks of
Canada as species of Asterophyllites; the figures bear a closer
resemblance to the genus Annularia. The same author figures some
irregularly whorled impressions as Protannularia, which appear to be
identical with a fossil described by Nicholson[661] from the Skiddaw
slates (Ordovician) of Cumberland as Buthotrephis radiata, but the
specimens are too imperfect to admit of accurate determination.
d. Cones.
The occurrence of fossil plants in the form of isolated fragments is
a constant source of difficulty, and is well illustrated by the numerous
examples of strobili which cannot be connected with their parent
stems. We are, however, usually able to recognise Calamitean
cones if the impressions or petrified specimens are fairly well
preserved, but it is seldom possible to correlate particular types of
cones with the corresponding species of foliage-shoots or stems.
Palaeobotanical literature contains numerous illustrations and
descriptions of long and narrow strobili designated by different
generic terms such as Volkmannia, Brukmannia, Calamostachys,
Macrostachya and others; many of these have since been
recognised as the cones of Calamites, while some species of
Volkmannia have been identified with Sphenophyllum stems. Before
further considering the general question of Calamite cones, a few
examples may be described in detail as types of fructification which
are known to have been borne by Calamites. The examples selected
are species of the two provisional genera Calamostachys and
Palaeostachya.
The usual form of a Calamite cone is illustrated in fig. 93, which
represents a fertile shoot bearing a few narrow linear leaves of the
Calamocladus type; in the axils of some of these are borne the long
strobili.
Fig. 93. Calamostachys sp. A fertile Calamitean shoot. From a specimen
in the Geological Survey Museum, Jermyn Street, London. From the
Upper Coal-Measures of Monmouthshire (No. 5539).