What is the most commonly used file format for configuring .NET applications (previously it was XML)?
JSON
What type from Microsoft.Extensions.Configuration has methods SetBasePath() and AddJsonFile()?
ConfigurationBuilder
What is a second use of the C# using keyword (the primary way being to use a type from a different namespace)?
Creating aliases
What class library project was introduced with .NET Core 1.0 to help with a situation where you have significant shared code already written in .NET Framework and want to start using new .NET?
.NET Standard
What is the platform and CPU agnostic code at the core of a .NET assembly?
CIL
An instance of what type is returned by the Build() method of ConfigurationBuilder?
IConfiguration
What are pieced together into .NET apps?
Assemblies
What is a versioned, self-describing binary hosted by the .NET runtime?
An assembly
What does the Pro C# book call a "code library" corresponding to a *.dll that contains types intended to be used by external applications?
A class library
If you have a code library in C#, what are the languages you can reuse it in?
Any other .NET language
Why are .NET assemblies a supreme form of code reuse?
They achieve language-neutral code reuse
As an example of cross-language code reuse, an interface in F# would be implemented by what in C#?
Structures
What is "perfectly possible (although certainly not common)?"
For an executable .NET assembly to use types defined within an external executable *.exe file
How similar are .NET assemblies and previous *.dll Windows binaries internally?
They have little in common
What do .NET assemblies promote according to the Pro C# book?
Code reuse
What node do you add to a *.csproj file to name the root namespace?
RootNamespace
What feature did C# 10 add related to namespaces?
File-scoped namespaces
What is the base namespace named after the project and a single class, Program in C#?
The root namespace
What namespace is the IO namespace nested in (.NET)?
System
How do the Visual Studio property pages refer to the root namespace?
The Default namespace
{
"CarName": "Suzy",
"Car": {
"Make":"Honda",
"Color": "Blue",
"PetName":"Dad's Taxi"
}
}
What would be the method call on the IConfiguration instance to get the PetName of the Car from this?
config["Car:PetName"]
What is the method of IConfiguration to get an entire section from the configuration JSON?
GetSection()
What feature added in C# 10 allowed removing about 2 pages per chapter in the Pro C# book?
File-scoped namespaces
What is a type's name prefixed with the defining namespace (C#)?
A fully qualified name
What can be helpful (and sometimes necessary) when using multiple namespaces that have identically named types (C#)?
Fully qualified names
What is the most commonly used syntax for creating nested namespaces (C#)?
Dot notation
Example:
namespace CustomNamespaces.MyShapes;
What is a common practice with C# namespaces that can make the namespace structure clearer to other developers?
Grouping files in a namespace by directory
What file can you edit to configure the root namespace of a .NET project?
The *.csproj file
What is a versioned, self-describing binary file hosted by the .NET runtime?
An assembly
What are pieced together to construct a .NET app?
Assemblies
What is the blob of metadata that an assembly has that describes the assembly itself?
The manifest
What consists of an operating system file header, a CLR file header, CIL code, type metadata, an assembly manifest, and optional embedded resources?
A .NET assembly
What are unlike .NET console applications in that they do not have an entry point and cannot be launched directly?
Class libraries
What does the Pro C# book call a name-value pair format where each object is enclosed in curly braces?
JSON
What keyword specifies that a type can be used only by the assembly in which they are defined?
internal
What is this command adding?
dotnet add CSharpCarClient reference CarLibrary
A project reference
What aspect of .NET development is illustrated by a Visual Basic class deriving from a class authored in C#?
Cross-language inheritance
What is the package manager for .NET?
NuGet
What term refers to packaging up your app and its related dependencies?
Publishing
What way of publishing a .NET app means .NET will not need to be installed on the target machine?
Self-contained deployment
What must you specify in the project file or through the command-line options when publishing .NET apps as self-contained?
The target runtime identifier
How will the publish process be by default for a .NET application where the runtime identifier has been specified?
Self-contained
What short option to dotnet publish is the output directory to place the published artifacts in?
-o
What long option to dotnet publish will make the .NET runtime be published with the app?
--self-contained
What argument to the short option -r of dotnet publish means 64-bit Windows?
win-x64
What process that occurs during publishing a .NET app determines what can be removed based on what your app really uses?
File trimming
What folder in Windows is where the Pro C# book says is where the .NET runtime and framework files are installed?
C:\Program Files\dotnet
What does the runtime host provides that are used when a version of the .NET runtime is started to find an application's dependencies?
A set of probing paths
What does the Pro C# book call .NET binaries that contain logic intended to be reused across a variety of projects?
Class libraries
What long option to dotnet publish will make the app be published as a framework-dependent application without the .NET runtime?
--no-self-contained
What is the command in the .NET CLI for publishing applications?
dotnet publish
What is the verb that means packaging up your application and its related dependencies to give it to your users?
Publishing
What type of .NET app deployment requires the framework to be installed on the target machine?
A framework-dependent deployment
What type of .NET app does not require .NET to be installed on the target machine?
A self-contained application
What option to dotnet publish causes the .NET runtime to be published with the app so that the runtime doesn't need to be installed on the target machine?
--self-contained
Previous card
First card
Random order
Next card