This course presents a collection of interesting/unusual case studies where C# is used to solve a particular problem. This course is 100% practical, and demonstrates mainly the practical applications of C# in building solutions to common problems.
The main themes covered in this course are:
This course presents a collection of interesting/unusual case studies where C# is used to solve a particular problem. This course is 100% practical, and demonstrates mainly the practical applications of C# in building solutions to common problems.
The main themes covered in this course are:
Numerics — the specifics of how to work with numeric types in .NET, with a focus on SIMD data types and operations.
Reflection — how to operate reflection mechanisms to investigate assemblies and types, how to create types and invoke their members. Also a look at the practical use of reflection for working with attributes.
Memory Management — a discussion of latest C# features for high performance computation, such as the passing of value types by reference, ref structs and Span<T>.
Extension Methods — a seemingly simple mechanism has plenty of advanced uses.
In addition, this course comes with a section dedicated to assorted topics that also showcase advanced uses of C#. These topics include:
Exploiting IDisposable — shows how you can abuse the IDisposable/using mechanism in order to dynamically define operations as pairs of start/end calls. Useful for things like simple performance measurement.
Continuation Passing Style — demonstrates how you can define complex algorithms in terms of sequentially invoked methods with customized return types indicating the result of the operation.
Local Inversion of Control shows that sometimes inversion of control happens at a local scale. Here we use extension methods to invert control on a bunch of different data types, providing useful functionality.
Beyond the Maybe Monad — even though C# introduced the ?. operator in order to chain null checks together, the classic monad implementation, based on extension methods, is still relevant, as it can also handle other scenarios.
Mnemonics — not so much a C# language feature but rather an interesting way of defining huge sets of similar code templates that can be expanded quickly to the code constructs you need the most.
Course Pre-Requisites
Good understanding of C#
Understanding of object-oriented programming (OOP)
Experience writing real-world C# applications
Course Organization
100% hands-on
Demonstrated either in Visual Studio or using the Kinetica rendering engine
Demos are single .CS files
Heavy use of IDE features
Ad-hoc use of 3rd-party packages
Enjoy.
An overview of what we'll encounter in this course.
An overview of what we'll learn in this section.
An overview of built-in integral types.
An integer types with arbitrary precision.
An overview of the two IEEE754 floating-point types (float and double) and the specifics of their operation.
A specialized fixed-point type suitable for financial calculations.
An overview of how SIMD works and why you should care.
A look at .NET support for SIMD intrinsics.
A look at a general-purpose SIMD-enabled type.
A summary of what we've learned about numerics in .NET.
An overview of Reflection in .NET.
A look at System.Type, the cornerstone of all things related to Reflection.
We explore System.Type and find out what kind of information can be gleaned about types.
Given a System.Type, we can construct it — either by using System.Activator or by invoking a constructor.
A look at how to call methods using reflection.
Learn how to work with delegates and events using reflection.
You need reflection to work with attributes.
A summary of the things we've learned when working with reflection.
An overview of the principle of dynamic programming and the 'dynamic' keyword.
Introducing the 'dynamic' keyword.
A base class for all dynamic objects.
Practical example of dynamic object for parsing XML.
A dynamically growing object.
A look at how dynamic can help us implement the Visitor pattern.
A summary of what we've learned about dynamic programming in C#.
Think extension methods aren't 'advanced'? Think again.
A look at all the different types you can extend.
You can write ordinary and generic extension methods on synthesized ValueTuple types.
Extension methods typically add behavior. Let's take a look at how to add data persistence, too.
A look at some of the patterns you encounter when writing extension methods.
Fluent interface chaining is useful for a lot more than null checks!
A summary of the things we've learned about extension methods.
An overview of this section of the course.
A look at the 'in' keyword used for parameters.
Ref readonly variables.
We look at 'ref struct' and why it was needed for Span<T>.
A practical demonstration of Span<T>.
A summary of what we've learned about the C# memory management features.
Default interface methods allow us to create mixins for consumption via duck typing.
A look at a programming style that can help with structuring your code.
Inversion of Control doesn't have to be application-wide. The principle also applies to little things.
How can you write mundane code faster? Use mnemonics, of course!
A summary of the things we've learned in this course.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.