about programming and software engineering by a hungarian living in austria
Discount for my course: High Performance Coding with .NET Core and C#

Contents tagged with C#

ref structs in C# 7.2 - .NET Concept of the Week - Episode 16

In this episode we talk about 'ref structs', which was introduced in C# 7.2. You will learn what it is, where it is used in the framework and when you should use it in your own code.

AWS for .NET Developers - AWS Lambda, S3, Rekognition - .NET Concept of the Week - Episode 15

In this episode we create a "Not Hotdog" clone from Silicon Valley (HBO) called "SchnitzelOrNot" with .NET and AWS. For this we use AWS Lambda with .NET Core, S3, and Amazon Rekognition.

New course: C# and .NET - Advanced topics

I published a new course on Udemy. In this post I write a little bit about the course itself and I also give a few “behind the scenes” details about how such a course is made.

C# Exception Filters - .NET Concept of the Week - Episode 14

In this episode we talk about exception filters in C#. We will take a look at the generated IL code and we will also discuss that entering a catch block always unwinds the stack, which makes debugging harder and also can hurt performance. With an exception filter we can avoid this!

Struct layout in C# - .NET Concept of the Week - Episode 13

In this episode I talk about struct layout in C#. You will learn how C# structs are represented in memory and you will also learn how you can influence this with StructLayoutAttribute.

Hosting ASP.NET Core 2.1 in IIS (ANCM, in-process model) - .NET Concept of the Week - Episode 12

In this episode we take a look at the changes in the ASP.NET Core Module (ANCM) in 2.1. ANCM is the IIS module that we need to host ASP.NET Core apps in IIS.

SIMD and Vectorization - .NET Concept of the Week - Episode 11

In this episode I talk about SIMD in .NET. We take a look at the Vector type from the System.Numerics namespace and I show you how you can tell RyuJIT to generate SIMD instructions with this Vector type.

WebAssembly and Blazor - .NET Concept of the Week - Episode 9

In this episode we take a look at WebAssembly and Blazor. You will learn what WebAssembly is, and we will write C# code that we will execute in the browser with Blazor on top of WebAssemply.

ASP.NET Core SignalR 101 - .NET Concept of the Week - Episode 8

In this episode we take a look at ASP.NET Core SignalR. I show how you can create a real time chat application with a few lines of code with the help of SignalR.

ASP.NET Core Authentication with Facebook and Twitter - .NET Concept of the week - Episode 6

In this episode you will see how you can outsource authentication to Facebook and Twitter in ASP.NET Core.

BenchmarkDotNet - .NET Concept of the week - Episode 5

In this episode I talk about BenchmarkDotNet.

Covariance and Contravariance in C# - .NET Concept of the week - Episode 4

This time I explain what covariance and contravariance are. You will learn about covariance and contravariance with delegates, arrays, and generic interfaces.

C# 8 Nullable Reference Types - .NET Concept of the week - Episode 3

In this episode I show you the preview C# 8 compiler and we talk about a very interesting proposal for C# 8 called nullable reference types

WebSocket in .NET Standard with UWP and Xamarin - .NET Concept of the week - Episode 2

The second video form my new thing is out! In this short video I show you how you can use WebSocket in a .NET Standard library and then we will use this .NET Standard library in a UWP and in a Xamarin.iOS app.

CancellationToken and Task Cancellation - .NET Concept of the week - Episode 1

I decided to start something new! I will create a video every week, where I explain a concept related to .NET programming. The first video is out! It’s about CancellationToken and task cancellation.

C# 7 Performance - Playlist

I have a part in my 'High performance Coding with .NET and C#' Udemy course that is basically a stand-alone section. I uploaded it to YouTube and in this blogpost, you can watch the videos in order. It's about performance related features in C# 7.

Build 2017 Day 1

This post is a recap of the first day of Build 2017

Referencing an F# library from C# on .NET Core

Aaaand a post again, which will be deprecated at some point: currently using both F# and C# in a .net core solution is possible, but needs some workaround. Here I describe how you can do it

Working with .net core - my summary after 6 months with ASP.NET Core on a side project

I have a side project which I started at the beginning of this year. One of the top goals of this project is to learn new things and i'm still at the beginning of this, but I already have many things working.

How the evil System.Xml.Serialization.XmlSerializer class can bring down a server with 32Gb ram

This week I worked on some interesting stuff and fortunately there was a cool learning outcome from it, which is worth a blogpost, so I summarize it here.

Talk: The Universal Windows Platform - One codebase for Mobile, Desktop, IoT, Xbox, Hololens, etc.

On the 14th of January I gave a talk at a local technology meetup in Linz called Technologieplauscherl about the Universal Windows Platform. This post is the written form of the talk, which was intended for people who do not know UWP, but have a strong background in software development (and it's even better if you have some knowledge about C#/XAML based development).

Porting a Windows 8 Store app to the Universal Windows Platform

Back in 2012 I published a small Windows Store app called PassworWallet, which already had a few thousand downloads over the years and when Windows 10 came out the daily 5-10 downloads went up to 15-20, so I thought it's time to release an update, so the last days I updated it to UWP. This post summarizes the update process.

Test In-App Purchases in Windows Universal Apps (UWP)

The Universal Windows Platform supports In-App Purchases (IAP). This feature was already available in Windows 8/8.1, but I have not used it before. In this post I explain how you can debug an IAP in a UWP app.

Fields in Types marked with beforefieldinit are initialized later when the assembly is ngened

The topic of this post is the beforefieldinit flag. Part I is basically a recap, all those things are already documented and there are great posts about that. Part II is where the fun begins. I googled very long, but I did not find that information on the web (that's why I write this now).

Building ASP.NET Applications under Mac

Last week I was in San Francisco at the Build conference and in the “Introducing ASP.NET 5 Session” there was a short demo, which was very interesting: Scott&Scott basically created an asp.net project and opened it in Visual Studio Code and compiled and started the whole thing on a Mac.

Passing data from C# to cross-compilable C++ via Windows Runtime

This post shows how to pass data from C# code to a portable, pure C++ layer via the Windows Runtime. This can be interesting to people who write portable C++ libraries, especially for mobile platforms.

Asynchronous programming in C#

Two posts from me were published on the about:performance blog about the async capabilities of C#

Marshalling Jagged Arrays from CLR to Native

This week I was working on some stuff where I calculated some values in C# and I wanted to send it to a native C++ layer to use the values there. The data was originally stored in a Dictionary<int List<long>>. As soon as I realised that I want to work with this in C++ it was clear that the Dictinary and the List classes are not the best, so instead of the C# collections I used a C# jagged array and I hoped that the framework can marshal it automatically. Well I was naive…

Classes with long initialization process implemented with Tasks in C#

When I work on Windows 8 Apps I often have the situation where I have a class which has a longer initialization process (e.g. deserialising some state from the file system, loading data over the network, make some complicated calculation, etc). One solution would be to write a public 'initialize' method and call it first to initialize the class. The problem with this is that it is…