Tag Archives

Archive of posts published in the tag: .NET

.NET Inside Out Part 9 — Generating Func from a bunch of bytes in C# revisited

This is the ninth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# We know how to generate delegate from a byte…

Async Wandering Part 5 — Catching exceptions from async void

This is the fifth part of the Async Wandering series. For your convenience you can find other parts in the table of contents in Part 1 – Why creating Form from WinForms in unit tests breaks async? Last time we saw how to…

Custom memory allocation in C# Part 11 — Benchmarking UnsafeList

This is the eleventh part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack I presented some results suggesting that UnsafeList is faster than…

Custom memory allocation in C# Part 10 — Hijacking new in .NET Core

This is the tenth part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack I had .NET Core 2.1.103 x64 installed and I wanted…

Custom memory allocation in C# Part 9 — Hijacking new in x64

This is the ninth part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack We already hijacked new in C#. Last time we did…

Exception propagation in WinForms

Let’s start with the following code: using System; using System.Windows.Forms; class Program1 { [STAThread] static void Main() { var form = new Form(); form.Load += (sender, e) => throw new Exception(); try { Application.Run(form); } catch(Exception e) { MessageBox.Show(“This doesn’t execute”); } finally…

Concurrency Part 6 – Abandoned mutex

This is the sixth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Let’s start with the following code: using System; using System.Threading; namespace AbandonedMutex {…

Concurrency Part 4 – .NET with P/Invoke

This is the fourth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET We have already seen a mutex in C# but last time it happened…

.NET Inside Out Part 3 — How to override sealed function in C#

This is the third part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# Warning — clickbait title! We are not going to…

Async Wandering Part 4 — Awaiting for void methods

This is the fourth part of the Async Wandering series. For your convenience you can find other parts in the table of contents in Part 1 – Why creating Form from WinForms in unit tests breaks async? C# allows us to write async…

Async Wandering Part 3 — Awaiting in synchronous WinForms code

This is the third part of the Async Wandering series. For your convenience you can find other parts in the table of contents in Part 1 – Why creating Form from WinForms in unit tests breaks async? async and await are great features…

Async Wandering Part 2 — Synchronous call on WinForms control and ObjectDisposedException

This is the second part of the Async Wandering series. For your convenience you can find other parts in the table of contents in Part 1 – Why creating Form from WinForms in unit tests breaks async? I once found the following code…

Referencing binaries in C# and Nuget

Sometimes there is a need to reference binary in C# project. It is pretty easy — we need to add reference to dll (if it is a managed one) or add it to project and copy it to output directory on build (if…

Traits in C# Part 3 — Stacking traits

This is the third part of the Traits in C# series. For your convenience you can find other parts in the table of contents in Part 1 — Basic implementation with Fody Last time we implemented method overriding using traits. Today we are…

Traits in C# Part 2 — Overrides

This is the second part of the Traits in C# series. For your convenience you can find other parts in the table of contents in Part 1 — Basic implementation with Fody Last time we saw simple implementation of traits in C#. Today…

Traits in C# Part 1 — Basic implementation with Fody

This is the first part of the Traits in C# series. For your convenience you can find other parts using the links below : Part 1 — Basic implementation with Fody Part 2 — Overrides Part 3 — Stacking traits If you are…

Async Wandering Part 1 — Why creating Form from WinForms in unit tests breaks async?

This is the first part of the Async Wandering series. For your convenience you can find other parts using the links below (or by guessing the address): Part 1 — Why creating Form from WinForms in unit tests breaks async? Part 2 —…

Yet Another Useless Language Part 11 — Storing binary on the disk

This is the eleventh part of the YAUL series. For your convenience you can find other parts in the table of contents in Part 1 — Introduction We already know how to parse YAUL application and execute it. Today we are going to…

Yet Another Useless Language Part 9 — Standard library

This is the ninth part of the YAUL series. For your convenience you can find other parts in the table of contents in Part 1 — Introduction Today we are going to describe standard library for YAUL. Introduction Every language has it’s own…

Yet Another Useless Language Part 8 — Function

This is the eighth part of the YAUL series. For your convenience you can find other parts in the table of contents in Part 1 — Introduction Today we are going to handle functions in YAUL. Let’s go. Introduction We are going to…