Please select random order or first card below to begin studying 🤓
Congratulations! You have finished studying this set of cards
What has support for numerous programming languages that share a common runtime engine, language integration with cross-language inheritance, exception handling, and debugging, a comprehensive base class library, a simplified deployment model, and extensive command-line support?
.NET
.NET can be understood as what two things from a programmer's point of view?
A runtime environment and base class library
What describes all of the possible data types and programming constructs supported by the .NET runtime?
The Common Type System
What is the specification related to the Common Type System that defines the subset of common types and programming constructs that all .NET languages agree on?
The Common Language Specification
What language does C# look very similar to?
Java
What family of programming languages do both C# and Java belong to?
The C family
What term can be understood as a collection of services that are required to execute a given compiled unit of code?
Runtime
Code that targets the .NET runtime is referred to as:
Managed code
What in C#/.NET is a grouping of semantically related types contained in an assembly or possibly spread over multiple assemblies?
A namespace
What is the new C# feature which removes the need to wrap code in braces when placing it in a custom namespace?
File-scoped namespaces
What is the fundamental .NET namespace that provides a core body of types including Int32 and String?
System
What is the file extension seen in both .NET binaries and unmanaged Windows binaries (despite these having absolutely no internal similarities)?
.dll
What does the .NET platform make extensive use of to keep all the types within the base class libraries well organized?
Namespaces
The .NET base class libraries is sometimes written as what abbreviation?
BCLs
When a *.dll has been creating using a .NET compiler, what is the term for the binary blob?
An assembly
What is the metadata (that is different from and in addition to the CIL and type metadata) in a .NET assembly that describes the assembly itself?
The manifest
The set {constructor, finalizer, static constructor, nested type, operator, method, property, indexer, field, read-only field, constant, and event} describes what in general in C#?
Type members
What is the C# keyword for System.Int64 in the Common Type System?
long
What is the C# keyword for System.Single in the Common Type System?
float
By convention, all .NET interface names begin with?
I
What are the three languages that are directly supported by Microsoft and can build .NET applications?
C#, Visual Basic, and F#
What is the term for a binary blob created by a .NET compiler?
An assembly
The common intermediate language code contained in the .NET assembly is conceptually similar to what?
Java bytecode
What are the JIT compilers used by .NET sometimes called?
Jitters
What do you also get, that you might install separately, when you install the .NET SDK?
The .NET runtime
What is the command to list all the .NET runtimes installed on your machine?
dotnet --list-runtimes
What is the command to list all the .NET SDKs that are installed?
dotnet --list-sdks
What's the first thing to install to get started developing applications with C# and .NET?
The .NET SDK
What long option to the dotnet command will display the .NET SDK version in use?
--version
What long option to the dotnet command will display the installed runtimes?
--list-runtimes
What long option to the dotnet command will display the installed SDKs?
--list-sdks
What in .NET terminology can contain multiple projects that all work together?
A solution
What is the dotnet CLI command to restore all of the NuGet packages required for your solution?
dotnet restore
What is the dotnet runtime for building ASP.NET Core applications?
Microsoft.AspNetCore.App
What is the dotnet runtime that is the foundational runtime for .NET?
Microsoft.NETCore.App
What is the node in the *.csproj file that sets the .NET version?
TargetFramework
What is the dotnet command to check for updates for your installed versions of the .NET SDK and runtimes?
dotnet sdk check
What file can you put in a .NET project to make dotnet.exe --version in that directory (and any subdirectory) pinned to something?
global.json
What in C# is a general term referring to a member of the set {class, interface, structure, enumeration, delegate}?
A type
C# demands that all program logic be contained within a what?
Type definition
What is missing from this list of things that are each considered a type in C#?
interface, structure, enumeration, delegate
class
What is missing from this list of things that are each considered a type in C#?
class, structure, enumeration, delegate
interface
What is missing from this list of things that are each considered a type in C#?
class, interface, enumeration, delegate
structure
What is missing from this list of things that are each considered a type in C#?
class, interface, structure, delegate
enumeration
What is missing from this list of things that are each considered a type in C#?
class, interface, structure, enumeration
delegate
How do you create a global function or point of data in C#?
It is not possible in C#
What is the namespace that contains the C# Console class?
System
using System;
What feature made it so that this statement is no longer needed to write a simple C# hello world program?
Implicit global namespaces
What using statement is no longer needed to write a hello world program in C# with the new implicit global namespaces?
using System;
What is an example of iterating through a string array (called args) using the foreach keyword in C#?
foreach(string arg in args) {}
What is an example (C#) of iterating through a string array (called args) using a standard for loop?
for (int i = 0; i < args.Length; i++) {}
What is the case convention for all C# keywords?
lowercase
What is the case convention for all namespaces, types, and member names in C#?
PascalCase
What relatively new feature of C# can be used to eliminate much of the ceremony around the C# application's entry point?
Top-level statements
When not using top-level statements, what conventionally is the name for the class that includes the Main() method in a C# program?
Program
What method signifies the entry point of a C# application, and prior to C# 9 which introduced the top-level statement functionality, was required in every C# app?
Main()
What term refers to the class that defines the Main() method in a C# app?
The application object
What member of the C# Console class sends a text string and a carriage return to the standard output?
WriteLine()
How many files in a C# app are allowed to use top-level statements?
Only one
What can a C# Main() method do (if you want) to specify an application error code (or code that indicates success)?
Return an int instead of void
By convention, what integer returned by an app indicates success?
0
What is the C# Console method which is similar to WriteLine() but does not append a carriage return to the end of the text string it outputs?
Write()
What type in C# defines a set of static methods to do basic I/O?
Console
What is the C# Console method which allows you to receive information from the input stream up until the Enter key is pressed?
ReadLine()
What is the C# Console method that can be used to capture a single character from the input stream?
Read()
Does using the var keyword in C# result in dynamic typing?
No, it is still strongly typed
The C# Console methods that capture input and output are all called by being prefixed with the name of the class because they are what type of methods?
Static
What are the 2 steps to declare a local variable in C#?
Specify the type followed by the variable's name
At one point is it a good practice to assign an initial value to a declared variable in a language like C#?
At the time of declaration
What C# keyword is a shorthand notation for System.Int32?
int
How many bits is an int in C#?
32
How many bits is a uint in C#?
32
How many bits is a short in C#?
16
How many bits is a ushort in C#?
16
How many bits is a long in C#?
64
What C# keyword is a shorthand notation for System.Int16?
short
What is the highest value that a variable of type ushort can have in C#?
65535
What is the lowest value that a variable of type sbyte can have in C#?
-128
What is the highest value that a variable of type sbyte can have in C#?
127
What is the highest value that a variable of type byte can have in C#?
255
What C# keyword is a shorthand notation for System.Boolean?
bool
What type in the C# System namespace has the shorthand notation float?
Single
What type in the C# System namespace has the shorthand notation double?
Double
What C# literal can be used to assign a default value for the data type?
default
E.g.:
int myInt = default;
What is the keyword used in C# when declaring a variable using the default constructor?
new
What is the ultimate base class of all C# types?
System.Object
Can a class derive from ValueType in C#?
No
What creates a scope in C#?
Curly braces
{ }
What class in C# defines a set of methods common to all types in the .NET Core base class libraries including ToString(), Equals(), and GetHashCode()?
System.Object
Where are types that descend from ValueType (of which many numerical types derive from) allocated?
The stack
What word describes generating a variable of a type given a textual equivalent?
Parsing
What can be used as a digit separator character in C#?
_
E.g.:
Console.Write(123_456.12);
What is an example of what you might want to do using literal binary values like 0b_0001_0000 in C#?
Create bit masks
What is the property in C# that returns the length of the current string?
Length
What are the characters in C# called that when present in string literals, qualify how the character data should be printed to the output stream?
Escape characters
What is the escape character in C# that inserts a double quote into a string literal?
\"
What is the escape character in C# that inserts a single quote into a string literal?
\'
What is the escape character in C# that inserts a backslash into a string literal?
\\
What is the escape character in C# that inserts a horizontal tab into a string literal?
\t
What programming feature involves a string literal containing placeholders for values?
String interpolation
What is a string that is prefixed with the @ symbol in C# known as?
A verbatim string
What character can a string be prefixed with in C# that will disable the processing of the string literal's escape characters?
@
Where are reference types allocated in C#?
The managed heap
When a test for equality on reference types is performed in C# (== and !=) what is the condition for == to return true?
Both references point to the same object in memory (strings are a notable exception as they are reference types but compared by value)
Since methods called on strings in C# return new strings, we can say that strings are what?
Immutable
What properties of numerical types in .NET Core can be used to determine the range a given type can store?
MaxValue, MinValue
What is the C# namespace that defines BigInteger?
System.Numerics
What is the C# namespace that defines Complex?
System.Numerics
What refers to an implicit upward cast that does not result in a loss of data (e.g. Add() expects two int arguments but it can be called with two shorts because there is no possibility for data loss)?
Widening
What is the property in C# that returns the length of the current string?
Length
What method in C# is analogous to upcase in Ruby?
ToUpper()
What method in C# is analogous to downcase in Ruby?
ToLower()
What is the C# casting operator?
()
E.g.:
short answer = (short)Add(numb1, numb2);
What is the act of determining the composition of a type at runtime?
Reflection
What does using var to declare local variables in C# simply for the sake of doing so bring to the table?
Very little
It might be argued that the only time to use the var keyword in C# is when?
Defining data returned from a LINQ query
How is a scope created in C#?
Curly braces
Do && and || short-circuit in C#?
Yes
Do & and | short-circuit in C#?
No
What language construct/keyword in C# and other C-based languages allows you to handle program flow based on a predefined set of choices?
switch
What statement in C# takes a string and an out parameter, parses the string and assigns the parsed value to the out variable, and returns true if successful?
TryParse()
An object allocated on the garbage-collected managed heap in C# is what kind of type in general?
A reference type
How is a scope created in C, C#, Java, and other languages based on C?
Curly braces
When using the C# operators like == and != with reference types, when would a test for equality return true?
When the references point to the same object in memory
What enum in C# has values which can be used by overloads of methods like Equals() and Compare() to control how the comparisons are done with respect to things like culture?
StringComparison
What can we say about strings in C# that describes this: once a string object is assigned an initial value, the character data cannot be changed?
Strings in C# are immutable
What is defined as a set of contiguous data points of the same type?
An array
When an array is declared in C# and each index is not explicitly filled with a value, what is the value for the unset indexes?
The default value of the data type
What is the default value for a bool in C#?
false
What is an example of declaring an array in C# by specifying the total number of items in the array?
(Declare an array of 3 ints)
int[] myInts = new int[3];
What is an example of declaring an array using the C# array initialization syntax which specifies each array item?
(Declare an array with three bools--each false)
bool[] boolArray = { false, false, false };
What is an example of declaring an implicitly typed array in C#?
(Declare an array with 1, 10, 100, and 1000)
var a = new[] { 1, 10, 100, 1000 };
What is the base class to every type in C#, including the fundamental data types?
System.Object
What is the data type to declare an array with in C# if you want the subitems of the array to be any type?
System.Object
What is the term for an array of multiple dimensions where each row is of the same length?
A rectangular array
What is the term for an array of multiple dimensions where the inner arrays each may have a different length?
A jagged array
What is the property to return the number of items in an array in C#?
Length
What is the static Array method in C# to reverse the contents of a one-dimensional array?
Array.Reverse()
What is the difference between a method and function in C#?
A function returns a value to the caller
What are methods within methods called in C#?
Local functions
What in C# is a function declared inside another function that must be private and does not support overloading?
Local functions
Do local functions support nesting in C#?
Yes
What does it mean for a parameter to be sent into a function by value?
A copy of the data is passed in
What method can be called on a List<string> object in C# to convert it to an instance of string[] (an array of strings)?
ToArray()
Which of ? or : comes first in a ternary statement in C#?
?
What is the VS Code IDE recommended syntax for declaring an empty array of strings in C#?
Array.Empty<string>()
What is the default way a parameter is sent into a function in C#?
By value
(The reference is passed by value for reference types)
In C#, what are the two cases that relate to exactly what is copied when a parameter is sent into a function by value?
If the parameter is a value type or reference type
What is an enumerator in C#?
A class or structure that implements the IEnumerable interface
By convention, the suffix of an enum type name in C# is usually what?
Enum
What is the parameter modifier in C# to mark a parameter as an output parameter?
out
What is the well-known special case of a reference type in C# that is still passed by value?
string
What is a term for a temporary, dummy variable that is intentionally unused?
A discard
What is the parameter modifier you can use in C# if you want a method to be able to change the value of a passed in argument?
ref
What is the C# keyword that allows you to pass into a method a variable number of identically typed parameters as a single logical parameter?
params
What is a method called when there are multiple methods with the identical name but differ in the number or type of parameters?
Overloaded
What is the C# keyword for the custom data type of name-value pairs?
enum
What is the C# interface that objects must support to work with the foreach loop (and objects that do can be called enumerators)?
IEnumerable
What is the bitwise AND operator in C#?
&
What is the bitwise OR operator in C#?
|
What is the bitwise XOR operator in C#?
^
What is the ones' compliment operator in C# (that flips the bits)?
~
What did C# 6 introduce that can be used to shorten the syntax of defining single-line methods?
Expression-bodied members
What is one line of code showing a method that adds two ints together and returns an int using the expression-bodied member feature of C#?
static int Add(int x, int y) => x + y;
What is the left shift operator in C#?
<<
What is the right shift operator in C#?
>>
What does System.ValueType ensure about types derived from it in C#?
That they are allocated on the stack
What is a nullable type in C#?
A type that can be all of the values of its underlying type, and null
When does a value type variable die in C#?
When it falls out of scope
What types in C# are allocated on the stack?
Value types
What C# type has the purpose of overriding the virtual methods defined by System.Object to use value-based instead of reference-based semantics?
System.ValueType
What is the result of this (C#)?
0110 << 1
1100
What is the result of this (C#)?
0110 >> 1
0011
What is the result of this (C#)?
1100 & 0100
0100
What is the result of this (C#)?
0110 | 0100
0110
What is the result of this (C#)?
0110 ^ 0100
0010
What is a one-line way to throw an ArgumentNullException if the variable message was null in C#?
ArgumentNullException.ThrowIfNull(message);
What is the operator in C# to flip the bits of a binary number?
~
What is the result of this (C#)?
0011 ^ 1100
1111
What is the result of this (C#)?
0111 ^ 1011
1100
What is the ones' compliment of a binary number?
The value you get by flipping all the bits
Why can you not reassign a reference type argument to be a new object inside a method call in C#?
The reference is passed by value (it is a copy of the reference to the object)
If you want to reassign a reference to point to a new object inside a method call in C#, what parameter modifier must you use?
ref
What types in C# are allocated on the managed heap?
Reference types
A reference type in C# can inherit from any type except for what?
System.ValueType
When does a reference type variable die in C#?
When it is garbage collected
What values can a nullable bool have in C#?
true, false, or null
When using the ? suffix to use a nullable value type, this is really just shorthand for what type?
System.Nullable<T>
With the System.Nullable<T> structure type, what kind of types can be used as T?
Value types
What is an example of declaring a variable of a nullable int type in C#?
int? nullableInt = 10;
What is the null-coalescing operator in C# (for the benefit of a more compact version of a traditional if/else condition)?
??
Example:
int myData = dr.GetIntFromDatabase() ?? 100;
What is the null-coalescing assignment operator in C# (assigns the left-hand side to the right-hand side only if the left-hand side is null)?
??=
Example:
int? nullableInt = null;
nullableInt ??= 12;
What is an example using the null conditional operator in C# (Length property of args but do not throw an error if args is null)?
args?.Length
What light construct in C# provides a convenient way to return more than one value from a method?
Tuples
When a type in C# returns a tuple from a method in order to return out the class instance's individual properties, what is the method conventionally called?
Deconstruct()
What does C# support for the purpose of creating a set of symbolic names that map to known numerical values?
Enumerations
What does it look like to declare an enum EmpTypeEnum that uses byte as the storage value rather than an int in C#?
enum EmpTypeEnum : byte
What class type do .NET Core enumerations get functionality from?
System.Enum
What is the process of changing the implementation of a virtual (or abstract) method of a base class in a derived class in C# called?
Overriding
The <Nullable> node in a C# project file listing can be used to opt in or configure what?
Nullable reference types
With C# 10, are nullable reference types enabled or disabled by default?
They are enabled
How to declare a tuple called values in C# that has a string "a", an int 5, and a string "c" using the var keyword?
var values = ("a", 5, "c");
What type is this (C#)?
var values = ("a", 5, "c");
ValueTuple
What type of method parameters in C# must be assigned by the method being called (a compiler error occurs if the called method fails to assign it)?
Output parameters
What are a special reference type in C# that provide methods for equality using value semantics and data encapsulation?
Records
What is a user-defined type composed of field data (member variables) and members that operate on this data (C# terminology)?
A class
In the eyes of the C# compiler, what makes the different constructors of a class different?
Number and type of the constructor arguments
What is an instance of a class otherwise known as (C#)?
An object
The power of object-oriented languages allowing you to group data and related functionality in unified class definitions is that it allows you to do what?
Model your software after entities in the real world
What keyword in C# provides access to the current class instance?
this
What methods in C# allow the state of an object to be established at the time of creation?
Constructors
public Car(string pn) => petName = pn;
This C# constructor is an example of what type of member?
An expression-bodied member
What is the "freebie" that every C# class is provided, which never takes arguments, but allows all field data of the class to be set to an appropriate default value, and you can redefine it if you want?
The default constructor
How can you redefine the default constructor of a C# class?
Define a constructor that takes no arguments
Record types in C# are really one specialized type of what?
class
C# supports mutable record types by using standard (not init-only) setters, but record types are really intended to be used for data models that are what?
Immutable
How is a constructor named in C#?
Identical to the class they construct
What is a special method of a class that is called indirectly when creating an object using the new keyword in C#?
A constructor
What is the keyword used to define a class in C#?
class
What is the keyword in C# to allocate an object into memory?
new
What are supported by C# and allow the state of an object to be established at the time the object is created?
Constructors
What is a special method of a class that is called indirectly when creating an object using the new keyword (C#)?
A constructor
What kind of members must be invoked from the class in C# (rather than an object)?
Static
Members of a class deemed to be so commonplace that there is no need to create an instance of a class will be declared as what kind of members (C#)?
Static
What kind of class is a class that does not maintain any object-level state and is never created with the new keyword?
A utility class
What kind of members does a C# utility class expose functionality with?
Static
What are the three pillars of OOP that all object-oriented programming languages must content with?
Encapsulation, inheritance, and polymorphism
What pillar of OOP boils down to the language's ability to hide implementation details from the user?
Encapsulation
What pillar of OOP boils down to the language's ability to allow you to build new class definitions based on existing class definitions?
Inheritance
What is the topmost parent class in any and every class hierarchy in .NET?
System.Object
What pillar of OOP boils down to the language's ability to treat related objects in a similar way?
Polymorphism
What type of member in a C# base class defines a default implementation that may be overriden by a base class?
virtual
What type of member in a C# base class provides only a signature and must be overridden by a derived type?
abstract
In C#, properties, methods, constructors, and fields are all considered what?
Type members
What is the default applied access modifier for a type in C#?
internal
What is the default applied access modifier for a type member in C#?
private
What is a type called when it is declared directly within the scope of a class or structure in C#?
A nested type
The traditional approach to allow interacting with certain private fields of a class is to define 2 methods called what?
An accessor and a mutator
What is the language feature preferred to use for encapsulation over accessor and mutator methods in .NET Core languages?
Properties
What type members in C# are just a container for "real" accessor and mutator methods, named get and set?
Properties
What is the token, or contextual keyword (not a true C# keyword), that can be used within the set scope of a property to represent the incoming value used to assign the property by the caller?
value
How do you make a property read-only in C#?
Omit the set block
How do you make a property write-only in C#?
Omit the get block
What C# feature can be used to streamline a lot of repetitive, basic properties?
Automatic property syntax
What can you type in both Visual Studio and Visual Studio Code (and hit tab twice) to generate starter code for a new automatic property?
prop
What is the shorthand notation offered by C# used to create a class variable using a constructor and then set the state data by property?
The object initialization syntax
Can the object initialization syntax in C# be used to set a property where the property setter is marked private?
No
What keyword does C# offer to define constant data, which can never change after the initial assignment, and the value of which must be known at compile time?
const
Can a constant in C# have its value determined at runtime?
No
Why can the value of a constant in C# not be assigned inside a constructor?
A constructor is invoked at runtime and the value of constant data must be known at compile time
What is the condition for a const string value to use string interpolation in their assignment statement (new in C# 10)?
All the components used must also be const strings
How is a read-only field different from a constant in C#?
A read-only field can have a value assigned at runtime and a read-only field is not implicitly static
What is the keyword in C# that allows a single class to be partitioned across multiple code files?
partial
When defining a class in C# across multiple files, each part must be marked with what keyword?
partial
What is the special reference type that provides synthesized methods for equality using value semantics and data encapsulation in C#?
Record
What is the following equivalent to (C#)?
record CarRecord
record class CarRecord
Defining a record like this in C# removes the need for what property?
record CarRecord(string Color);
public string Color { get; init; }
What method do record types using positional parameters have (a method with an out parameter for each positional parameter in the declaration)?
Deconstruct()
How do record types in C# behave with Equals(), ==, and !=?
They compare like value types
What is the construct in C# that can be used to create a true copy of a record with one or more properties modified?
with
Example:
CarRecord ourOtherCar = myCarRecord with {Model = "Odyssey"};
What are the value type equivalent of record types (new in C# 10)?
Record structs
According to the Pro C# book, what are the two forms of code reuse?
Inheritance and containment/delegation
Inheritance can be described as what kind of relationship?
"is-a"
Containment/delegation can be described as what kind of relationship?
"has-a"
In .NET, is it safe to store an object of a derived class type within a base class reference?
Yes
What type of cast is it called in .NET when a derived class object is stored within a base class reference?
An implicit cast
What type of casting in .NET is why you can pass an object argument as a method parameter where the parameter is a parent class of the object's class?
Implicit casting
Is it possible in .NET to cast an object from a base class type to a derived type that is lower in the inheritance chain?
No
Hexagon h = item as Hexagon
What value will h have if item is not a type that can be explicitly cast to a Hexagon?
null
What instance method of System.Object compares items and, by default, only returns true if the items being compared refer to the same item in memory?
Equals()
If you override the System.Object Equals() method in C#, then what other method should you also override (because both of these methods are used internally by Hashtable types to retrieve subobjects from the container)?
GetHashCode()
When you build a class in C# that does not explicitly define its parent class, what is the parent class?
System.Object
What method of System.Object does ValueType override so that structures can do value-based comparisons?
Equals()
"For the time being, you can understand this method (when overridden) is called
to free any allocated resources before the object is destroyed."
What method of System.Object does this quote describe?
Finalize()
What method of System.Object returns an int that identifies a specific object instance?
GetHashCode()
What method of System.Object returns a string representation of the object using the fully qualified name (<namespace>.<type name>)?
ToString()
What keyword in C# is similar to as but it returns false instead of null when an explicit cast is not possible?
is
What method of System.Object returns a Type object that fully describes the object you are currently referencing (this is a runtime type identification method available to all objects)?
GetType()
What method of System.Object exists to return a member-by-member copy of the current object, which is often used when cloning an object?
MemberwiseClone()
What keyword does C# provides to quickly determine at runtime whether a given type is compatible with another (by checking against a null return value)?
as
What two keywords can you use in C# to trap the possibility of an invalid explicit cast resulting in a runtime exception?
try catch
When is explicit casting evaluated in .NET (at compile time or runtime)?
Runtime
What type of cast can you use in .NET when you know the object reference is pointing to a compatible class in memory but the compiler cannot?
An explicit cast
What is the ultimate base class in the .NET system?
System.Object
What are three terms for the existing class that serves as the basis for new classes in classical inheritance?
Base class, superclass, parent class
What are two terms for the extending classes in classical inheritance?
Derived class, child class
What is the operator that establishes an "is-a" relationship (inheritance) in C#?
:
Does a derived class inherit the constructor of a parent class in C#?
Never
What can be used/what is it called in C# to allow a constructor to be called by a derived class?
Constructor chaining
Does C# support multiple inheritance?
No
What is it called when a class in a programming language can have more than one direct parent class?
Multiple inheritance
What is the keyword in C# that prevents inheritance from occurring?
sealed
What category of types in C# is always sealed?
structure
What C# keyword can be used whenever a subclass wants to access (not override) a public or protected member defined by a parent class?
base
What happens to the default constructor in a C# class when a custom constructor is added to the class definition?
The default constructor is silently removed
What kind of C# members are directly accessible by any descendent of the class but outside the family, regarded as private?
Protected
What C# keyword can be used to specify that a class cannot be extended by other classes?
sealed
What is the act of adding public members to a class containing an object that use the contained object's functionality?
Delegation
Can non-nested classes be declared using the private keyword in C#?
No
What C# keyword is used on a method that may be, but does not have to be, overridden by a subclass?
virtual
What keyword does a child class in C# use when it wants to change the implementation details of a virtual method?
override
What keyword can be used to enforce that a parent class cannot have instances of it created in C#?
abstract
What keyword should be used in C# to define a method that does not provide a default implementation and must be accounted for in each derived class?
abstract
An abstract base class's polymorphic interface in C# refers to its what?
Set of virtual and abstract methods
If you were using a third-party package, and your subclass of a class from the package defined an identical member as the parent class, this is an example of what happening?
Shadowing
What is the standard technique provided by the .NET platform to send and trap errors, that is common to all languages targeting the platform, called?
Structured exception handling
All exceptions in C# ultimately derive from what class?
System.Exception
What read-only property of System.Exception retrieves a collection of key-value pairs (represented by an object implementing IDictionary) that provide additional, programmer-defined information about the exception?
Data
What read-only property of System.Exception can be used to obtain information about previous exceptions that caused the current exception to occur?
InnerException
When you throw a new System.Exception object in .NET, what read-only property gets set via the class constructor?
Message
What read-only property of System.Exception contains a string that identifies the sequence of calls that triggered the exception?
StackTrace
What is the keyword used in C# to raise an exception?
throw
Example:
throw new Exception($"{PetName} has overheated!");
What can you make use of in C# programming when you are invoking a method that may throw an exception?
A try/catch block
What are exceptions thrown by the .NET platform called?
System exceptions
What is a good .NET class to derive custom exceptions from instead of System.Exception?
ApplicationException
What is the default access modifier applied to a non-nested type in .NET?
internal
What optional block can be used with try/catch in C# to ensure that some code will always execute regardless of an exception happening or not?
finally
What type in C# essentially expresses a behavior that a given class or structure may choose to support?
Interface
Can classes and structures in C# support more than one interface?
Yes
What is the keyword to define an interface in C#?
interface
public struct PitchFork : ICloneable, IPointy
{...}
What is this C# code showing?
A struct implementing two interfaces
public class Fork : Utensil, IPointy
{...}
What is this C# code showing?
A class with a base class that implements an interface
If you try to cast a type to an interface and the type is not compatible, what exception class is thrown?
InvalidCastException
IPointy itfPt2 = hex2 as IPointy;
What will be itfPt2 if hex2 cannot be treated as the specified interface (C#)?
null
What category of types in .NET are basically named collections of abstract members?
Interfaces
What is the region of memory that .NET objects are allocated to and where they will be automatically destroyed by the garbage collector sometime in the future?
The managed heap
When you use the C# new keyword, the return value is a reference to the object that is stored on the heap. Where is the reference stored?
The stack
What is a short and incomplete answer to the question of how the .NET garbage collector knows when an object is no longer needed?
When it is unreachable by any part of the code base
What does the .NET runtime build during a garbage collection process that represents every reachable object on the heap?
An object graph
What does the managed heap maintain to identify exactly where the next object will be located (C#)?
The next object pointer
What will the .NET runtime do if it determines that the managed heap does not have sufficient memory to allocate the requested type when processing a newobj instruction?
It performs a garbage collection
How are objects on the managed heap in .NET divided so that the runtime does not have to literally examine every object there?
Each object on the heap is assigned to a "generation"
When the .NET garbage collector investigates the generation 0 objects and finishes getting rid of objects, what happens to any objects that survived?
They are promoted to generation 1
What happens when the .NET garbage collector examines and gets rid of generation 0 objects that it can but additional memory is still required?
It then evaluates generation 1
Nongeneric collections and generic collections are the two broad categories of what in .NET?
Collection classes
ArrayList, BitArray, Hashtable, Queue, SortedList, and Stack from System.Collections are examples of what?
Nongeneric collections
What is the process of explicitly assigning a value type to a System.Object variable, which allocates a new object on the heap and copies the value type's value into that instance?
Boxing
Why are generics in C# more performant (compared to nongeneric collections)?
They do not result in boxing or unboxing penalties when storing value types
Why are generics in C# type-safe (compared to nongeneric collections)?
They can contain only the specified type
When you see something like List<T>, what is the pair of angled brackets with a token within called?
A type parameter
What syntax is this an example of?
List<int> myGenericList = new List<int> { 0, 1, 2, 3, 4, 5, 6 };
Collection initialization syntax
This example is an example blending what two syntaxes of the C# language?
List<Point> myListOfPoints = new List<Point>
{
new Point { X = 2, Y = 2 },
new Point { X = 3, Y = 3 },
new Point { X = 4, Y = 4 }
};
Object initialization syntax and collection initialization syntax
What is probably the most frequently used type from the System.Collections.Generic namespace?
List<T>
Any application you create with .NET will need to manipulate a set of what in memory, that can come from a relational database, a text file, an XML document, a web service call, user-provided input, etc.?
Data points
What namespace are nongeneric collections typically found in .NET?
System.Collections
What are the two types of broad categories of data that the .NET Core platform supports?
Value types and reference types
What mechanism does C# provide to store the data of a value type within a reference variable?
Boxing
What is it called when you assign a .NET value type to a System.Object variable?
Boxing
What can you use to avoid the issues of boxing/unboxing performance penalties and lack of type safety of the collections in previous .NET versions?
Generic collections
What generic interface defines general characteristics (e.g., size, enumeration, and thread safety) for all generic collection types?
ICollection<T>
What generic interface allows a generic collection object to represent its contents using key-value pairs?
IDictionary<TKey, TValue>
What namespace is the generic List<T> class from in .NET?
System.Collections.Generic
What is a way you can read the symbol <T> of generic items in .NET?
"of type T"
What is it called when the CoreCLR allocates a new object on the heap to copy a value type's data value into it?
Boxing
What System.Collections interface defines general characteristics for all nongeneric collection types?
ICollection
What System.Collections interface provides behavior to add, remove, and index items in a sequential list of objects?
IList
What namespace are generic collections primarily found in .NET?
System.Collections.Generic
What notation is the telltale sign of any generic item in .NET?
<T>
What are nongeneric containers considered since they are typically designed to operate on System.Object types?
Loosely typed
What class from the System.Collections.Generic namespace represents a collection that maintains items using a last-in, first out manner?
Stack<T>
What are two members defined by Stack<T> (that you might expect)?
Push() and Pop()
What is the most frequently used type in System.Collections.Generic?
List<T>
What class from the System.Collections.Generic namespace is useful to model a scenario in which items are handled on a first-come, first-served basis?
Queue<T>
What generic interface provides the base interface for the abstraction of sets in .NET?
ISet<T>
What generic interface provides behavior to add, remove, and index items in a sequential list of objects in .NET?
IList<T>
What member of Queue<T> is used to remove and return the object at the beginning of the Queue<T>?
Dequeue()
What member of Queue<T> is used to add an object to the end of the Queue<T>?
Enqueue()
What member of Queue<T> is used to return the object at the beginning of the Queue<T> without removing it?
Peek()
What type in System.Collections.ObjectModel represents a dynamic data collection that has the ability to inform external objects when its contents have changed in some way?
ObservableCollection<T>
What type of method can you implement for a C# class that enables you to provide access to internal subitems using an array-like syntax?
An indexer method
What keyword must be used in .NET to declare an anonymous type?
var
What syntax must be used in .NET to declare an anonymous type?
Object initialization syntax
What type of type can be used to quickly model the "shape" of data with little overhead in .NET?
An anonymous type
What type do anonymous types automatically derive from in .NET?
System.Object
What is the syntax for creating an indexer method in C#?
this[]
Example (inside PersonCollection class):
public Person this[int index]
{
get => (Person)arPeople[index];
set => arPeople.Insert(index, value);
}
What is an example of how you might overload the + operator in C# in a Point class?
public static Point operator + (Point p1, Point p2) => new Point(p1.X + p2.X, p1.Y + p2.Y);
What are the first two or three restrictions when defining an extension method in C#?
It must be defined within a static class, and it must also be a static method. The first parameter of the static method must use the this keyword
Example:
static class MyExtensions
{
public static void DisplayDefiningAssembly(this object obj) {}
public static int ReverseDigits(this int i) {}
}
If you had a Square and Rectangle class in a C# app and wanted to be able to write the following code:
Square s = (Square)rectangle
What example code might you have in the Square class?
public static explicit operator Square(Rectangle r)
{
Square s = new Square {Length = r.Height};
return s;
}
What was introduced in .NET to allow adding new methods or properties to a class or structure without modifying the original type in any direct manner?
Extension methods
What is the keyword and syntax used in C# to declare an anonymous type?
var and object initialization syntax
Example:
var car = new { Make = make, Color = color, Speed = currSp };
All anonymous types in C# automatically derive from what class?
System.Object
What is the C# lambda operator?
=>
What is the type in C# that is the preferred means of defining and responding to callbacks in applications?
The delegate type
What were the C-style function pointers historically used by the Windows API to configure a function to report back to another function?
Callbacks
What are "nothing more than a concise way to author anonymous methods and ultimately simplifying how you work with the .NET delegate type?"
Lambda expressions
What do C# delegates have support for that traditional C++ function pointers do not?
Multicasting
What is C#'s token for the lambda operator found in lambda calculus?
=>
What type in .NET and .NET Core is able to do what callbacks did before in a type-safe and object-oriented manner?
delegate
When you build a type using the C# delegate keyword, you are indirectly declaring a class type that derives from what class?
System.MulticastDelegate
What type from the System namespace is a generic delegate that can "point to" a method that takes up to 16 arguments and returns void?
Action<>
What type is similar to Action<> but it can point to methods that have a custom return value?
Func<>
What is the class that derives from System.Delegate and provides the necessary infrastructure for a C# delegate to hold onto a list of methods to be invoked later?
System.MulticastDelegate
What is the main requirement when defining a delegate type in C#?
It must match the signature of the method(s) it will point to
What can a delegate do in .NET once it has been created and given the necessary information?
Invoke the method(s) it points to at runtime
What type is the preferred means of defining and responding to callbacks within apps under the .NET platform?
delegate
What is the C# lambda operator?
=>
What type in .NET is a type-safe object that "points to" a method or a list of methods that can be invoked later?
delegate
What type in .NET is a type-safe object that "points to" a method or a list of methods that can be invoked later?
The delegate type
When creating a delegate in C#, what is the main requirement that must be met when defining it?
It must match the signature of the method(s) it will point to
When the C# compiler processes delegate types, it automatically generates a sealed class derived from what class that allows the delegate to hold onto a list of methods to invoke later?
System.MulticastDelegate
When you build a type using the C# delegate keyword, you are indirectly declaring a class that derives from what type?
System.MulticastDelegate
What is the unabbreviated form of LINQ?
Language Integrated Query
What provides a concise, symmetrical, and strongly typed manner to access a variety of data stores in C#?
LINQ
What can be understood as a strongly typed query language embedded directly into the grammar of C#?
LINQ
What keyword in C# allows you to define a local variable without explicitly specifying the underlying data type?
var
Some functionality of the LINQ to Objects API can only be accessed by calling extension methods of what class?
Enumerable
What type defines the various extension methods that the LINQ query operators such as from, in, where, orderby, select are shorthand for?
Enumerable
When LINQ Queries are compiled, the C# compiler translates all C# LINQ operators into calls on methods of what class?
Enumerable
What generic delegate type have "a great many" of the methods of Enumerable been prototyped to take as arguments (LINQ)?
Func<>
What term refers to the act of applying LINQ queries to arrays and collections?
LINQ to Objects
What term refers to the act of using LINQ to manipulate and query XML documents?
LINQ to XML
What term refers to an aspect of LINQ that lets you use LINQ queries with the ADO.NET EF Core API?
LINQ to Entities
What term refers to parallel processing of data returned from a LINQ query?
Parallel LINQ (PLINQ)
The words from, in, where, orderby, and select are examples of what in C#?
LINQ query operators
What specific syntax of LINQ is this?
IEnumerable<string> subset =
from game in currentVideoGames
where game.Contains(" ")
orderby game
select game;
LINQ query expression syntax
What specific syntax of LINQ is this?
IEnumerable<string> subset =
currentVideoGames.Where(g => g.Contains(" ")).OrderBy(g => g).Select(g => g);
Extension method syntax
What will you always want to make use of when capturing the results of a LINQ query in C#?
Implicit typing (the var keyword)
What is the type of the return value (the generic interface that it implements) of a LINQ query (most of the time)?
IEnumerable<T>
What is it called that describes how LINQ query expressions that return a sequence do not actually evaluate until you iterate over the resulting sequence?
Deferred execution
What is a thing to note about a LINQ statement that selects a single element (such as by using First()/FirstOrDefault()/Single()/SingleOrDefault()) regarding execution?
The query is executed immediately
What is the difference between First()/FirstOrDefault() and Single()/SingleOrDefault()?
Single()/SingleOrDefault() throws an exception if more than one element is returned from the query
What are the three operators that every LINQ query expression is built from?
from, in, select
What is the general template for a LINQ query expression using the operators from, in, and select?
var result = from item in container select item;
What is the general template for a LINQ query expression using the three basic operators and also where to obtain a specific subset?
var result = from item in container where BooleanExpression select item;
What is the extension method that can be used with the result of a LINQ query to remove duplicate entries?
Distinct()
What is one (or a couple) example of an extension method that can be used with LINQ queries to perform an aggregation operation on the result set?
Count()
Also: Max(), Min(), Average(), Sum()
What can be regarded as a fixed, safe boundary for a running application?
A process
What are logical subdivisions within a given .NET process?
Application domains (AppDomains)
In really simple terms, what is a process?
A running program
What is uniquely assigned to every Windows process?
A process identifier (PID)
What formally speaking is an operating system-level concept that is a set of resources and the necessary allocations used by a running application?
A process
On machines with a single (nonhyperthreaded) CPU that cannot literally handle more than one thread at a time, the single CPU executes one thread for a unit of time based in part on the thread's priority level, and then suspend that thread to allow another thread to do some work. The unit of time is called a what?
A time slice
What namespace and class in .NET allows you to analyze the processes on a given machine (local or remote) and programmatically start and stop processes?
System.Diagnostics.Process
What namespace and class in .NET represents a thread within a given process (it is used to diagnose a process's thread set, and is not used to spawn new threads in a process)?
System.Diagnostics.ProcessThread
What type provides a strongly typed collection of ProcessThread objects in the System.Diagnostics namespace?
ProcessThreadCollection
What property of the System.Diagnostics.Process type provides access to the ProcessThreadCollection class?
Threads
What property of the ProcessThread type gets the current priority of the thread?
CurrentPriority
What property of the ProcessThread type sets the preferred processor for the thread to run on?
IdealProcessor
What property of the ProcessThread type is used to get or set the priority level of the thread?
PriorityLevel
What property of the ProcessThread type gets the memory address of the function that the operating system called that started the thread?
StartAddress
.NET executables are hosted by a logical partition within a process called a what?
An application domain
What key aspect of the OS-neutral nature of .NET abstracts the differences in how an underlying OS represents a loaded executable?
AppDomains
What are far less expensive in terms of processing power and memory than full-blown processes and thus allow the CoreCLR to load and unload things faster than a formal process and improve server app scalability?
AppDomains
A .NET process application domain is capable of hosting and executing any number of related what (answer is not contextual boundaries)?
Assemblies
How many AppDomains can be in a process (as of .NET Core)?
Only one
What is a general term used to describe a given *.dll (or the *.exe itself) that is hosted by a specific process?
A module
What type is a vehicle to obtain diagnostic information for the active Windows threads within a running process (and not used to create multithreaded apps)?
ProcessThread
What static method of System.Diagnostics.Process returns a new Process object that represents the currently active process?
GetCurrentProcess()
What property of System.Diagnostics.Process gets the PID of the associated process?
Id
What property of System.Diagnostics.Process gets the name of the computer that the associated process is running on?
MachineName
What property of System.Diagnostics.Process gets the name of the process ("which, as you would assume, is the name of the application itself")?
ProcessName
What property of System.Diagnostics.Process gets a value indicating whether the user interface of the process is responding to user input (or is currently "hung")?
Responding
What property of System.Diagnostics.Process returns a collection of ProcessThread objects?
Threads
What static method of System.Diagnostics.Process returns an array of new Process objects running on a given machine?
GetProcesses()
What method of System.Diagnostics.Process closes a process that has a user interface by sending a close message to its main window?
CloseMainWindow()
What method of System.Diagnostics.Process immediately stops the associated process?
Kill()
What is a path of execution within a process?
A thread
What is the keystroke combo to active the Window Task Manager utility?
Ctrl+Shift+Esc
How are application domains further divided (.NET)?
Contextual boundaries
What is used to group like-minded .NET objects inside of an AppDomain?
Contextual boundaries
What is a logical subdivision within a given process that hosts a set of related .NET assemblies (in a nutshell)?
An application domain or AppDomain
A .NET AppDomain is further subdivided into what (which are used to group like-minded .NET objects)?
Contextual boundaries
What term refers to the initial thread of a process, that would be created when the Main() method of a C# project was invoked?
Primary thread
A process that contains only a single primary thread intrinsically is what?
Thread-safe
When a process spawns additional secondary threads, what are those threads called?
Worker threads
What always has a primary thread, and may contain additional threads that have been programmatically created?
A process
Who enjoys using an app that is really slow?
Nobody
What can be defined as a path of execution within an executable application?
A thread
Spawning additional threads will not necessarily make applications faster on what type of machines?
Single-core machines
What namespace released with .NET 1.0 offers one approach to building multithreaded applications?
System.Threading
When you write code that creates a new thread, can you guarantee that the thread executes immediately?
No, you can only instruct the OS/runtime to execute it as soon as possible, typically when the thread scheduler gets to it
What namespace in .NET provides types that enable the direct construction of multithreaded apps?
System.Threading
What type in System.Threading represents a thread that executes within the .NET runtime and can be used to spawn additional threads in the originating AppDomain?
Thread
What type in System.Threading provides a mechanism for executing a method at specified intervals?
Timer
What type in System.Threading allows you to limit the number of threads that can access a resource concurrently?
Semaphore
What most primitive type in System.Threading represents an object-oriented wrapper around a given path of execution within an AppDomain?
Thread
What instance-level member of System.Threading.Thread returns a bool that indicates if the thread has been started (and has not yet terminated or aborted)?
IsAlive
What instance-level member of System.Threading.Thread gets or sets a value that indicates whether the thread is a background thread?
IsBackground
What instance-level member of System.Threading.Thread instructs the .NET runtime to terminate the thread as soon as possible?
Abort()
What is a good property to set on a System.Threading.Thread instance that will greatly simplify your debugging endeavors?
Name
What instance-level member of System.Threading.Thread instructs the .NET runtime to start the thread as soon as possible?
Start()
What will happen if you decorate a method with the async keyword but that method does not have an internal await method call?
A compiler warning
What keywords can you use in .NET that will make the compiler generate a good deal of threading code on your behalf?
async and await
What static method of System.Threading.Thread suspends the current thread for a specified time?
Sleep()
What type in System.Threading is a delegate type used in conjunction with Timer?
TimerCallback
What type in System.Threading allows you to interact with the .NET runtime-maintained thread pool within a given process?
ThreadPool
What are threads that can prevent the current app from terminating?
Foreground threads
What are threads that are viewed by the .NET runtime as expendable paths of execution that can be ignored at any point in time?
Background threads
The .NET runtime will not shut down an app until all of what kind of thread have ended?
Foreground threads
What are sometimes called daemon threads?
Background threads
What issue can be described as the possibility of different threads changing the value of any shared data?
Concurrency
What type and delegate can you use in .NET when you need a function to be called every so often by the app (especially for noncritical background tasks like checking for new emails)?
System.Threading.Timer and TimerCallback
The types of what namespace are collectively referred to as the Task Parallel Library?
System.Threading.Tasks
What newer approach to multithreaded app development (newer than System.Threading) did Microsoft introduce with .NET 4.0?
Task Parallel Library (TPL)
What C# keyword qualifies that a method, lambda expression, or anonymous method should be called in an asynchronous manner automatically?
async
What can you use to mark a method with that will cause the .NET Core runtime to create a new thread of execution to handle the task at hand?
async
What C# keyword makes the current thread be paused when an asynchronous method is called?
await
What type of method call do you have if you have a method decorated with the async keyword and it contains no internal await?
A synchronous method
If you have a Main() method in Program.cs that returns an int, and you want to decorate Main() with async, what will the new return type be?
Task<int>
What two keywords were added in .NET 4.5 that further simplified the process of writing asynchronous code?
async and await
What type does System.Threading provide to interact with the runtime thread pool?
ThreadPool
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
What are the basic units of deployment in the .NET universe?
Assemblies
What namespace is useful for programmatically obtaining information that you would be able to investigate at design-time like types within a project's referenced assemblies, underlying CIL code, type metadata, and assembly manifests?
System.Reflection
What is the region of the .NET base class libraries devoted to file-based (and memory-based) input and output (I/O) services?
System.IO
What in I/O manipulation represents a chunk of data flowing between a source and a destination?
A stream
What, as a concept, is a sequence of bytes?
A stream
What provides a common way to interact with a sequence of bytes regardless of the type of device that stores or displays the bytes (file, network connection, printer, etc.)?
A stream
What term refers to the process of persisting the state of an object into a stream?
Serialization
System.IO is a namespace in .NET relating to what kinds (2) of services?
File-based (and memory-based) input and output (I/O) services
What class in .NET (in System.IO) provides temporary storage for a stream of bytes that you can commit to storage later?
BufferedStream
What class in System.IO for manipulating a machine's directory structure exposes functionality through static members only?
Directory
What class in System.IO for manipulating a machine's directory is used to make objects (instances)?
DirectoryInfo
What class in System.IO provides detailed information about the drives that a given machine uses?
DriveInfo
What class in System.IO for manipulating a machine's set of files exposes functionality through static members only?
File
What formatter from System.Text.Json can be used to persist the public state of an object as JSON?
JsonSerializer
What class in System.IO for manipulating a machine's set of files is used to make objects (instances)?
FileInfo
What class in System.IO gives you random file access (e.g., seeking capabilities) with data represented as a stream of bytes?
FileStream
What is the abstract class which is the parent of DirectoryInfo and FileInfo in System.IO?
FileSystemInfo
What member of FileSystemInfo has the name of the file or directory (C#)?
Name
What member of FileSystemInfo has the full path of the file or directory (C#)?
FullName
What member of DirectoryInfo is used to delete a directory and all of its contents?
Delete()
What member of DirectoryInfo is used to move a directory and its contents to a new path?
MoveTo()
What refers to several namespaces in .NET that allow you to work with relational database systems?
ADO.NET
What in ADO.NET is a set of types defined in a namespace for communicating with a specific database management system?
A data provider
What is an effective tool that allows .NET programmers to work with relational data but is not necessarily good in developer efficiency?
ADO.NET
What did Microsoft introduce since ADO.NET was not good enough in developer efficiency?
Entity Framework
What are the strongly typed objects held in specialized LINQ aware collection classes operated on in Entity Framework called?
Entities
What data annotation in EF declares a property that is used as the foreign key for a navigation property?
ForeignKey
What data annotation in EF declares a property as not nullable in the database?
Required
What data annotation lets EF Core know which property is the backing field for a navigation property?
ForeignKey
What data annotation informs EF Core of how entities are related by indicating the navigation property on the other end, and also makes the code more readable?
InverseProperty
What data annotation in EF excludes a property or class in regard to database fields and tables?
NotMapped
What data annotation in EF declares the navigation property on the other end of a relationship?
InverseProperty
In a one-to-many relationship in EF, the one side entity is the principal or dependent entity?
The principal
In a one-to-many relationship in EF, the many side entity is the principal or dependent entity?
The dependent
What class is the ringleader component of EF Core?
DbContext
What property of the DbContext class provides access to the database?
Database
What class in EF Core holds all of the DbSet<T> properties?
DbContext
What class in EF Core provides the SaveChanges() method that persists changes to the data store?
DbContext
What member of DbContext saves all entity changes to the database (in a transaction) and returns the number of records affected?
SaveChanges()
What three members of DbContext can add, update, and remove entity instances, respectively, and also are usually called directly on the DbSet<T> properties?
Add(), Update(), Remove()
What is the member of DbContext that provides access to information and operations for entity instances that the DbContext is tracking?
ChangeTracker
What is the state of an EF entity that is being tracked but does not yet exist in the database?
Added
What is the state of an EF entity that is being tracked and is marked for deletion from the database?
Deleted
What is the state of an EF entity that is not being tracked by the change tracker?
Detached
What is the state of an EF entity that is being tracked and has been changed?
Modified
What is the state of an EF entity that is being tracked, exists in the database, and has not been modified?
Unchanged
What is the recommended way (a type) to configure the DbContext instance at runtime?
DbContextOptions
What is the recommended way (a type) to configure the DbContext instance at design time?
IDesignTimeDbContextFactory
What is the member of DbContext that is called when a model has been initialized, but before it has been finalized, and is where methods from the Fluent API are used to finalize the shape of the model?
OnModelCreating()
What is the first thing or step to do in EF Core?
Create a custom class that inherits from DbContext
What method does the DbContext class expose that is used to shape your entities using the Fluent API?
OnModelCreating()
What class is a specialized collection property used to interact with the database provider to read, add, update, and delete records in the database?
DbSet<T>
What interface does the DbSet<T> implement which enables the use of LINQ queries to retrieve records from the database?
IQueryable<T>
What are the strongly typed classes that map to database tables called in EF?
Entities
How is the conceptual model of a physical database in Entity Framework (the entity data model) commonly referred to?
The model
What are the two class to table mapping schemes available in EF Core?
Table-per-hierarchy (TPH) and table-per-type (TPT)
What are, by definition, properties that map to a nonscalar type as defined by the database provider?
Navigation properties
The Pro .NET book recommends ORMs for what type of operations?
CRUD operations
The Pro .NET book recommends relying on the database for what type of operations?
Set-based operations
What are the three types which are the most prominent main types in EF?
DbContext, ChangeTracker, DbSet
What type in EF manages the instance of ChangeTracker, exposes the virtual OnModelCreating() method, holds the DbSet<T> properties, and supplies the SaveChanges() method?
DbContext
What member of DbContext has metadata about the shape of entities, the relationships between them, and how they map to the database (usually not used directly)?
Model
What member of DbContext provides access to information and operations for entity instances that the specific DbContext is tracking?
ChangeTracker
LINQ queries against DbSet<T> properties in EF are translated into what?
SQL queries
What happens when the ChangeTracker.Clear() method is used in EF?
All entities in the DbSet<T> collections have their state set to Detached
What approach when building a new app or adding EF Core into an existing application is when you create and configure your entity classes and the derived DbContext in code and then use migrations to update the database?
Code first
What approach when building a new app or adding EF Core into an existing application is when you scaffold the classes from an existing database?
Database first
What is the EF Core tooling that is a global CLI tool with the commands needed to scaffold existing databases into code, to create/remove database migrations, and to operate on a database?
dotnet-ef
What method, called when an EF model has been initialized, but not finalized yet, is where methods from the Fluent API are placed to finalize the shape of the model?
OnModelCreating()
What did ADO.NET lack that made Microsoft introduce Entity Framework?
Developer efficiency
What does this line of code in a class derived from DbContext basically specify?
public DbSet<Car> Cars { get; set; }
The Car class maps to the Cars table in the database
What in EF is a navigation property that maps to another entity (not a collection)?
A reference navigation property
Data retrieval queries in EF Core are created with LINQ queries written against properties of what type?
DbSet<T>
What in EF is a navigation property that maps to a collection of entities?
A collection navigation property
What in EF refers to DbSet<T> collections that are used to represent views, SQL statements, or tables without a primary key?
Query types
What method can you chain on to this to cause the database to be queried immediately?
var cars = context.Cars.Where(x=>x.Color == "Yellow");
ToList()
What do you need to do in between creating a record in code and calling SaveChanges() on the context in order to add the record to the database in EF?
Add the record to its DbSet<T>
What is the EntityState of an entity that has been created through code but has not yet been added to a DbSet<T>?
Detached
What method (when called) corresponds with ChangeTracker reporting all of the added entities and EF Core creating the appropriate SQL statements?
SaveChanges()
What is the EntityState of an entity after SaveChanges() executes?
Unchanged
What is the method of a DbSet<T> property that adds a single record?
Add()
What adding an object graph by adding child records into the parent's collection navigation property, does EF Core automatically retrieve the parent record's primary key identifier to include in the Insert statement for the foreign key id of the child record?
Yes
What is the method of a DbSet<T> property that adds multiple records?
AddRange()
What method can be called on most LINQ queries being used in EF Core to examine the query that gets executed?
ToQueryString()
What method is used to filter records from a DbSet<T>?
Where()
When you add child records to the database by putting them in the collection navigation property of their parent (EF) what is a cool term for what you are adding to the database?
An object graph
What method can you call on most LINQ queries to examine the actual query that gets executed against the database (new in EF Core 5)?
ToQueryString()
What method is used to filter records from a DbSet<T> in EF Core?
Where()
What term refers to loading related records from multiple tables in one database call?
Eager loading
Which of the two methods that provide paging capabilities in EF Core skips the specified number of records?
Skip()
Which of the two methods that provide paging capabilities in EF Core retrieves the specified number of records?
Take()
The three last applications explained by the Pro C# with .NET 6 book are what types of apps?
ASP.NET Core RESTful service, ASP.NET Core web app (using MVC pattern), ASP.NET Core web app using Razor pages
What web server could ASP.NET Core applications use after the dependency on System.Web was removed in the rewrite of ASP.NET?
Kestrel
What encompasses ASP.NET MVC, ASP.NET Web API, and Razor Pages in a single development framework?
ASP.NET Core
What command can be used instead of dotnet run in ASP.NET Core development to run with Hot Reload enabled?
dotnet watch
What is the base class of Controller in ASP.NET Core?
ControllerBase
What are methods on an ASP.NET controller that return an IActionResult (or Task<IActionResult> for async operations) or a class that implements IActionResult?
Actions
What is the ASP.NET Core type that a controller action returns?
IActionResult
What approach to preventing cross-site request forgery attacks does ASP.NET Core use which creates a unique and unpredictable server side token that is sent to the browser and must come back in any request from the browser or the request is refused?
Synchronizer Token Pattern (STP)
What attribute can be added to an HTTP Post method in an ASP.NET Core application to opt in for the STP token validation (this is enabled by default in Razor Page Web Apps)?
ValidateAntiForgeryToken
By convention, where are ASP.NET Core controllers placed in the directory structure?
Controllers
What is the web server typically used to run ASP.NET Core apps that can also act as a reverse proxy to use IIS, Apache, Nginx, etc.?
Kestrel
What is the command to run an ASP.NET Core app with "Hot Reload" enabled?
dotnet watch
With the unification of ASP.NET Core (combining ASP.NET MVC5 and ASP.NET Web API), the Controller, ApiController, and AsyncController base classes have been combined into one class, Controller, which has what base class?
ControllerBase
ASP.NET Core is developed as a modular system of what?
NuGet packages
What folder is where the views are placed in an ASP.NET Core (MVC style) application?
Views
What special folder for views in an ASP.NET Core app is accessible to all controllers and their action methods?
Shared
What would be the views folder specifically for the views used by the HomeController class in ASP.NET Core?
Views/Home
What is the folder where pages for the application are stored when building web applications using Razor pages?
Pages
What special folder under Pages in a Razor page based web application is accessible to all pages?
Shared
What feature can be used to organize related functionality into a group as a separate namespace for routing and folder structure for views and Razor pages where each gets its own set of controllers (API apps), controllers and views (MVC style), and pages (Razor page based apps)?
Areas
What parent folder stores the areas in ASP.NET Core?
Areas
What is the folder in ASP.NET Core web applications that the client side files are placed in?
wwwroot
What feature refers to how ASP.NET Core matches HTTP requests to the proper executable endpoints to handle those requests, and also create URLs from executable endpoints?
Routing
What is the C# attribute used in attribute routing in ASP.NET Core?
Route (or HttpGet, HttpPost, etc. to specify a specific HTTP verb)
Example: [Route("/Home")]
What type in ASP.NET Core is involved in model binding and contains an entry for every property being bound and an entry for the model itself?
ModelState
What feature of ASP.NET Core is a process where the name-value pairs submitted in an HTTP Post call are used to assign values to models?
Model binding
What is the ordered collection that holds URL patterns with variable placeholders (tokens) and optional literals that are the route definitions in an ASP.NET Core app?
The route table
What is it called when routes in an ASP.NET Core app are configured using C# attributes on controllers and their action methods?
Attribute routing
What are the optional placeholders in the route table's URL patterns called in ASP.NET Core?
Tokens
What is the difference between a double ** and a single * in a route definition like car/{**slug} (ASP.NET Core)?
** preserves path separator characters while * does not
What is a restriction on defining routes using tokens in ASP.NET Core?
There must be a literal value separating the tokens
Example:
{controller}/{action}/{id?} is valid
{controller}{action}{id?} is not valid
What is the process where ASP.NET Core uses the name-value pairs submitted in an HTTP Post call to assign values to models?
Model binding
What are the three reserved route tokens for ASP.NET MVC and RESTful service apps?
Area, Controller, Action
An instance of what type can be used to access environment variables and file locations in an ASP.NET Core app?
IWebHostEnvironment
What extension method of the HostEnvironmentEnvExtensions class returns true if the environment variable is set to Production (ASP.NET Core)?
IsProduction()
What type is used to create an instance of ILogger<T> in ASP.NET Core?
ILoggerFactory
What extension method of the HostEnvironmentEnvExtensions class returns true if the environment variable is set to Development (ASP.NET Core)?
IsDevelopment()
What are .NET console applications that create and configure a WebApplication (an instance of IHost)?
ASP.NET Core apps
What is the type that you call CreateBuilder on in a typical ASP.NET Core Program.cs?
WebApplication
What class in an ASP.NET Core app implements the IHostEnvironment interface and includes environment variables and file locations?
IWebHostEnvironment
What property of the IWebHostEnvironment in an ASP.NET Core app is set to the value of the ASPNETCORE_ENVIRONMENT environment variable?
EnvironmentName
What is the class in an ASP.NET Core app which has a property called EnvironmentName, usually with the value of ASPNETCORE_ENVIRONMENT?
EnvironmentName
What environment variable sets the value of the EnvironmentName property of IWebHostEnvironment?
ASPNETCORE_ENVIRONMENT
What type in an ASP.NET Core app is used to determine the runtime environment?
IWebHostEnvironment
What file usually sets the ASPNETCORE_ENVIRONMENT environment variable when developing the app?
launchSettings.json
What static class in ASP.NET Core supplies three environment names for you to use?
Environments
What class provides extension methods (isProduction(), isStaging(), etc.) on the IHostEnvironment for working with the EnvironmentName property?
HostEnvironmentEnvExtensions
ASP.NET Core apps are .NET console apps that create and configure a what?
WebApplication
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
//more code to be placed here later
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
What adds in support for using controllers and action methods?
AddControllers()
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
//more code to be placed here later
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
What creates the basic OpenAPI support?
AddSwaggerGen()
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
//more code to be placed here later
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
What compacts the most typical application setup into one method call (it configures the app using environment variables and JSON files, configures the default logging provider, and sets up the dependency injection container)?
CreateBuilder()
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
//more code to be placed here later
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
What type is used here to register services and do additional configuration after CreateBuilder() is called?
WebApplicationBuilder
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
//more code to be placed here later
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
What starts the app and gets everything ready to receive web requests and respond to them?
Run()
What would you use instead of AddControllers() (used for a RESTful service) in an MVC style ASP.NET Core app?
AddControllersWithViews();
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
What turns on HTTP Strict Transport Security?
UseHsts()
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
What enables static content (images, JavaScript files, CSS files, etc.) to be rendered through the application?
UseStaticFiles()
What mechanism that supports loose coupling between objects was one of the main tenets in the rewrite of ASP.NET Core?
Dependency injection
What are the three lifetime options that can be used when an item is configured into the ASP.NET Core dependency injection container?
Transient, Scoped, Singleton
What ASP.NET Core DI container lifetime option is "created each time they are needed"?
Transient
What ASP.NET Core DI container lifetime option is "created once for each request"?
Scoped
What ASP.NET Core DI container lifetime option is "created once on first request and then reused for the lifetime of the object"?
Singleton
What ASP.NET Core DI container lifetime option is recommended for Entity Framework DbContext objects?
Scoped
What type are services added into the DI container through (ASP.NET Core)?
IServiceCollection
What line is it important that you add services to the ASP.NET Core DI container before?
var app = builder.Build();
What method adds in the necessary services to support the MVC pattern in ASP.NET Core?
AddControllersWithView()
What do RESTful service web applications use instead of the AddControllersWithViews() method since they don't use views but do need controller support?
AddControllers()
What method that adds the DbContext into the DI container creates a pool of instances that are cleaned between requests (ensuring no data contamination)?
AddDbContextPool()
What attribute must be used in action methods to distinguish between a binding target and a service from the DI container?
FromServices
What class did ASP.NET Core 2.1 introduce that creates and configures HttpClient instances?
IHttpClientFactory
What are the options for web servers when deploying an ASP.NET Core app to Linux and not in a container?
Apache and Nginx
What does the Pro C# book call an example of a popular container-based deployment model?
Docker
What interface is logging in ASP.NET Core based on?
ILoggerFactory
What is the logging framework that can be used in ASP.NET Core that the Pro C# book covers?
Serilog
What unified ASP.NET Web API and MVC into one framework?
ASP.NET Core
From the beginning, ASP.NET Web API had been designed to be a service-based framework for building what kind of services?
REpresentational State Transfer (RESTful) services
How does the Pro C# book say JSON is pronounced?
"jay-sawn"
What are requests that originate from one server to the API of another server?
Cross-origin requests
What are requests that originate from another server communicating with an API?
Cross-origin requests
What is short for cross-origin requests?
CORS
What method must be called before adding the CORS policy to the services collection in an ASP.NET Core app?
UseHttpsRedirection()
What does the Pro C# book define as "URI that points to a physical resource on a network?"
URL
What do web APIs use to communicate success or failure (HTTP)?
Status codes
What attribute provides REST-specific rules, conventions, and behaviors when combined with the ControllerBase class?
ApiController
What status code will be returned by an ASP.NET Core controller if there is an issue with model binding?
400 Bad Request
What technique for web API versioning would leave 1.0 action methods in a ValuesController and create a Values2Controller to hold the version 2.0 methods?
Controller splitting
What are the two open source libraries the Pro C# book mentions add Swagger into ASP.NET Core APIs?
Swashbuckle and NSwag
What is the file that Swashbuckle generates that contains information for the site, each endpoint, and any objects involved in the endpoints?
swagger.json
What is the interactive UI that Swashbuckle provides to present the contents of swagger.json?
Swagger UI
What is the syntax for method signature comments that .NET can generate an XML documentation file?
///
What does the Pro C# book call concatenating a username and password with a colon, Base64 encoding it, and putting this in the Authorization header of the request?
Basic authentication
What attribute can be used in ASP.NET Core at a controller or action to require a user to be authenticated in order to access the resource?
Authorize
What attribute can be used in ASP.NET Core at a controller or action to turn off protection for a resource?
AllowAnonymous
What is the first part in the four-part numerical version numbers of .NET assemblies?
major
What is the second part in the four-part numerical version numbers of .NET assemblies?
minor
What is the third part in the four-part numerical version numbers of .NET assemblies?
build
What is the fourth part in the four-part numerical version numbers of .NET assemblies?
revision
What does the Pro C# 10 book call these of a type: member names, implemented interfaces, base classes, and constructors?
The composition
What part of a .NET assembly makes it self-describing?
The manifest
What is the blob of metadata that describes a .NET assembly and is part of it?
The manifest
What is the command to use dumpbin.exe to look at an assembly's operating system header info?
dumpbin /headers ExampleLibrary.dll
What part of a .NET assembly establishes the fact that the assembly can be loaded and manipulated by the target operating system?
The operating system file header
What example does the Pro C# book say is when you would become interested in the header data embedded in a .NET assembly?
Building a new .NET language compiler
What data that is part of a .NET assembly is used by the runtime as the image data loads into memory?
The CLR header
What is another way to refer to the manifest associated to a .NET assembly?
Assembly metadata
What does .NET support that contain nothing but localized resources like if you wanted to partition resources based on culture to build international software?
Satellite assemblies
What are .NET programs that have a single-entry point, can interact with the console, and can be launched directly from the operating system?
Console applications
What is the .NET Application Host that launches console applications in .NET (different from .NET Framework)?
dotnet.exe
What are the two cases of what the single-entry point can be in a .NET console app?
Main() or top-level statements
What type of .NET programs do not have an entry point and therefore cannot be launched directly?
Class libraries
What was the class library project introduced with .NET Core 1.0 that can be referenced by both .NET Framework and .NET applications?
.NET Standard
What are .NET assemblies that are used to encapsulate logic, custom types, and are referenced by other class libraries and/or console apps?
Class libraries
What are like classes that can contain only static methods in Visual Basic?
Modules
What in Visual Basic is equivalent to a C# static class?
A module
What is the default mechanism for loading .NET and its related framework pieces (ASP.NET Core, EF Core, etc.)?
NuGet
What node do you add to a .NET *.csproj file to cause the package to be rebuilt every time the software is built, either in bin/Debug or bin/Release?
GeneratePackageOnBuild
What is the XML-based file that controls the location of NuGet packages (on Windows)?
NuGet.Config
What directory is NuGet.Config located in on Windows?
%appdata%\NuGet
What is the largest NuGet package repository in the world?
NuGet.org
What is the dotnet CLI command to package up a NuGet package after running dotnet build -c Release?
dotnet pack
How do many organizations package their standard .NET assemblies for stuff like logging and error reporting for consumption into their line-of-business applications?
NuGet packages
What keyword in Visual Basic declares a local variable?
Dim
What is the statement in a Visual Basic program (Program.vb) that would be equivalent to using ExampleLibrary; in C#?
Imports ExampleLibrary
What keyword needs to be used to declare types in .NET if other .NET apps are to use them as well?
public
What does a .NET assembly contain instead of platform-specific instructions?
CIL
The just-in-time compiler that compiles CIL code on the fly does so according to instructions that are specific to what?
The platform and CPU
What short option can you add to any command in the .NET CLI to use the help system which is pretty good?
The .NET CLI
Can you live a happy and productive life without understanding the details of the CIL programming language?
Yes
What type of code does a .NET assembly contain that is a platform- and CPU-agnostic intermediate language?
CIL
What header that is part of a .NET assembly must be there for it to be hosted by the .NET runtime?
The CLR header
What is the command using dumpbin.exe to see the CLR header of an assembly?
dumpbin /clrheader ExampleLibrary.dll
What part of a .NET assembly enables the runtime to understand the layout of the managed file?
The CLR header
What will you be blissfully ignorant of but should be aware is used under the covers when the operating system loads a .NET assembly into memory?
The operating system file header
What utility does the Pro C#10 book recommend that ships with the C++ profiling tools?
dumpbin.exe
What first two things in the format of a .NET assembly can you pretty much always ignore?
The operating system file header and the CLR header
What specific thing in the manifest of a .NET assembly makes it self-describing?
Every external assembly it needs
What does the .NET runtime not need to do to resolve its location given how self-documented assemblies are?
The Windows system registry
Under default settings, what version is a .NET assembly assigned given the default .NET project settings?
1.0.0.0
What further establishes a type's identity in C# compared to namespaces?
The assembly in which the type resides