Skip to content

Latest commit

 

History

History
345 lines (330 loc) · 45.5 KB

File metadata and controls

345 lines (330 loc) · 45.5 KB

C# reference

Concepts

The C# concept exercises are based on concepts. The list below contains the concepts that have been identified by the track maintainers for the C# language.

(Please do not modify this document. it is automatically generated. All text except the concept learning objectives is sourced from exercises.json which should be updated manually when a concept is added, an "new exercise" issue is raised or the exercise is completed and merged into master. Learning objectives are scraped from the concept definition text in each exercise's design.md document and should be modified there as required.)

This report is updated automatically when any design.md document is modified or csharp/reference/README.md is edited.

Introductory Concepts

Essential Concepts

  • anonymous-types (anonymous-types)
  • async (async)
  • attributes-advanced (attributes-advanced) - Issue
  • collections-combining (linq)
  • collections-filtering (linq)
  • collections-mapping (linq)
  • collections-ordering (linq)
  • collections-reducing (linq)
  • contravariance (contravariance)
  • covariance (covariance)
  • delegates (delegates)
  • enumerables (enumerables)
  • events (events)
  • extension-methods (extension-methods) - Issue
  • generics-advanced (generics-advanced)
  • higher-order-functions (higher-order-functions) - Background
  • indexers (indexers)
  • lambdas (lambdas) - Background
  • linq (linq) - Background
  • linq-advanced (linq-advanced)
  • linq-query-syntax (linq-query-syntax)
  • linq-select-many (linq-select-many)
  • locks (locks)
  • pattern-matching-tuples (pattern-matching-tuples) - Issue
  • pattern-matching-types (pattern-matching-types) - Issue
  • recursion (recursion) - Background
  • reflection (reflection)
  • serialization (serialization)
  • statics (statics)
  • streams (streams)
  • tasks (tasks)
  • thread-safety (thread-safety)
  • yield (yield)

Advanced Concepts

  • aysnc-iterators (aysnc-iterators)
  • boxing (boxing)
  • by-ref (by-ref)
  • destructors (destructors)
  • dispose-pattern (dispose-pattern)
  • dynamic (dynamic)
  • immutability (immutability) - Background
  • immutable-collections (immutable-collections)
  • lazy (lazy)
  • local-functions (local-functions) - Background
  • memory-allocation (memory-allocation) - Issue
  • multi-dimensional-array (multi-dimensional-array)
  • pointsers (pointers) - Issue
  • queues (queues) - Background
  • ranges (ranges) - Background
  • ref-local (ref-local)
  • resource-pooling (resource-pooling) - Issue
  • slicing (slicing)
  • stacks (stacks) - Background
  • time-zones (time-zones)
  • unsafe-code (unsafe-code)

Unallocated Concepts

  • bitwise-manipulation (unallocated-concepts)
  • conditionals-do-while (unallocated-concepts)
  • conditionals-if (unallocated-concepts) - Background
  • generics-introduction (unallocated-concepts)
  • ordering (unallocated-concepts)

Learning Objectives

Concept Learning Objectives
arrays
  • know of the existence of the Array type
  • know how to define an array
  • know how to access elements in an array by index
  • know how to update an element in an array by index
  • know how to iterate over elements in an array
  • know of some basic functions (like finding the index of an element in an array).
basics
  • know what a variable is
  • know how to define a variable
  • know how to update a variable
  • know how to use type inference for variables
  • know how to define a method
  • know how to return a value from a method
  • know how to call a method
  • know that methods must be defined in classes
  • know about the public access modifier
  • know about the static modifier
  • know how to define an integer
  • know how to use mathematical operators on integers
  • know how to define single- and multiline comments.
booleans
  • know of the existence of the bool type and its two values
  • know about boolean operators and how to build logical expressions with them
  • know of the boolean operator precedence rules.
booleans
  • know of the existence of the bool type and its two values
  • know about boolean operators and how to build logical expressions with them
  • know of the boolean operator precedence rules.
casting
  • know what explicit and implicit casts are
  • know how to do an explicit cast
  • know how to use is and as to convert between types.
  • Understand casting of integral numeric types.
chars
  • know of the existence of the char type
  • know that a char represents
  • know how to define a char
  • know how to access a char in a string by index
  • know of some basic char methods (like converting to uppercase).
classes
  • know what classes are
  • know what encapsulation is
  • know what fields are
  • know how to create an object
  • know how to update state through methods
  • know about the void type.
conditionals
  • know how to conditionally execute code using an if statement.
conditionals-ternary
  • know how and when to use the ternary operator.
constants
  • know how to define const values
  • know how to define readonly modifier know when to use const or readonly.
constructors
  • know what constructors are
  • know how to define parameterless constructors
  • know how to define parameterized constructors
  • know how to use constructor overloading
  • know how to define private constructors.
cross-platform
  • know how to have different code paths (selected at run-time) for Linux, Windows and Mac
dictionaries
  • know of the existence of the Dictionary<TKey, TElement> type
  • know how to define a dictionary
  • know how to add and updated elements in a dictionary
  • know how to access elements in a dictionary by key
  • know how to iterate over elements in a dictionary
  • know some basic dictionary functions.
enums
  • know of the existence of the enum keyword
  • know how to define enum members
  • know how to assign values to enum members
  • know how to get an enum's numeric value
  • know how to convert an enum to a string.
equality
  • know how to check for equality and inequality
  • know how reference equality differs from structural equality
  • know that equality works by default for value and reference types
  • know how to customize equality checks using Equals and GetHashCode()
  • know of the IEquatable<T> and IEqualityComparer<T> interfaces and how to implement them.
exceptions
  • know what exceptions are
  • know when an exception should be thrown
  • know how to throw (and rethrow) an exception
  • know how to catch an exception
  • know the most important built-in exceptions (ArgumentException, InvalidOperationException).
expression-bodied-members
  • know the difference between statements and expressions
  • know how to define expression bodied members.
flag-enums
  • know how to define a "flags" enum
  • know how to add, remove or check for flags
  • know how to change the underlying type of an enum.
floating-point-numbers
  • know of the existing of the three floating point types: double, float and decimal. know when to use which floating point type.
for-loops
  • know how to use a for loop to do iteration.
foreach-loops
  • know how to iterate over a collection.
inheritance
  • know what inheritance is
  • know how to inherit from a class
  • know that all types inherit from object
  • know what abstract and sealed classes are
  • know what abstract and virtual methods are
  • know how to override methods
  • know about the protected visibility modifier.
integral-numbers
  • know of the difference between signed and unsigned integral types
  • know of the existence of the integral types: sbyte, byte, short, ushort, int, uint, long and ulong
  • know when to use which integral type.
interfaces
  • know what interfaces are
  • know how to use interfaces
  • know how to define an interface
  • know how to implement an interface
  • know how to explicitly implement an interface.
lists
  • know of the existence of the List<T> type
  • know how a list is different from an array
  • know how to define a list
  • know how to add and remove elements from a list
  • know how to access elements in a list by their index
  • know how to iterate over elements in a list
  • know some basic list functions (like finding the index of an element in a list).
method-overloading
  • know what method overloading is
  • know how to define overloaded methods
  • know the limitations of method overloading
named-arguments
  • know how to use named arguments
namespaces
  • know what namespaces are
  • know how to import namespaces.
nullability
  • know of the existence of the null literal
  • know what a NullReferenceException is and when it is thrown
  • know how to compare a value to null
  • know the difference between value and reference types regarding nullability
  • know how to define nullable reference and value types
  • know about the null-related operators
  • know about basic null checking by the compiler.
numbers
  • know of the existence of the two most commonly used number types, int and double
  • understand that the former represents whole numbers, and the latter floating-point numbers
  • know of basic operators such as multiplication, comparison and equality
  • know how to convert from one numeric type to another
  • know what implicit and explicit conversions are.
numbers
  • know of the existence of the two most commonly used number types, int and double
  • understand that the former represents whole numbers, and the latter floating-point numbers
  • know of basic operators such as multiplication, comparison and equality
  • know how to convert from one numeric type to another
  • know what implicit and explicit conversions are.
object-initializers
  • Know how to initialize objects using object initialization syntax. Know how to initialize lists and dictionaries. Understand the relative advantages of constructors and initializers.
operator-overloading
  • know when to how and why to overload operators for your own classes
  • understand the syntax of equality, comparison and arithmetic operators
  • know the syntax of user defined type conversion
  • know which operators cannot be overloaded
ordering
  • know how to implement the IComparable<T> interface and what its effect is on the behaviour of collections.
parameters
  • know the difference between value and reference type parameters
  • know how to pass value types by reference using the ref and out modifiers.
properties
  • know what properties are and how they relate to fields and methods
  • know what backing-field properties are
  • know what auto-implemented properties are
  • know what calculated properties are
  • know how to use property accessors to customize visibility
  • know how to define the different types of properties.
randomness
  • know how to implement randomness with System.Random in C#
  • know that no seed is required
  • know that both integers and real numbers can be generated
  • know that once generated random numbers can be easily used for many purposes (including non-numeric ones)
resource-cleanup
  • Know how to clean up resources with IDisposable in C# and .NET. Understand the difference between managedd and unmanaged resources and the role of IDisposable.
sets
  • Know how to use hash sets HashSet<T> as provided by the .NET BCL. Understand the relationship with Object.GetHashCode() and the performance charateristics of hash sets.
string-formatting
  • know how to use the ToString() method to convert any object to a string
  • know how to use string interpolation on values of any type
  • know how to use default format strings to convert to standard output formats
  • know how to use custom format strings to convert to custom output formats
  • know that string.Format underlies string interpolation
  • know of the StringBuilder type and when to use it
  • know that string interpolation can interpolate any expression.
strings
  • know of the existence of the string type
  • know of some basic functions (like looking up a character at a position, or slicing the string)
  • know how to do basic string formatting.
structs
  • know xx what structs are
  • know how to define a struct
  • know how to add members to structs
  • know the differences between structs and classes.
switch-statements
  • Know how to use switch statements
time
  • Know how to use DateTime when time-of-day is important. Understand the difference between local time and Universal Coordinated Time). Understand the role of CultureInfo in parsing times. Understand arithmetic with DateTimes.
tuples
  • know what a tuple is
  • know how to define a tuple
  • know how to name tuple fields
  • know that tuples have structural equality
  • know how to deconstruct tuples
  • know that tuples are mutable.
type-inference
  • know how to use the keyword, var
  • know when it is appropriate to use type-inference
user-defined-exceptions
  • know how to define a user-defined exception.
verbatim-strings
  • the syntax of verbatim strings.