Tag Archives

Archive of posts published in the tag: .NET

Concurrency Part 8 — Tracking mutex owner

This is the eighth 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 know how to use global mutexes to synchronize processes. However, there is…

Concurrency Part 7 — Semaphores trickery

This is the seventh 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 Last time we examined an interesting behavior of Mutex when it is abandoned.…

.NET Inside Out Part 11 — Using structs for devirtualization

This is the eleventh 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# Last time we saw how type markers can result…

Custom memory allocation in C# Part 13 — In-place serialization

This is the thirteenth 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 Recently Jean-Bernard Pellerin showed nice tricks for binary serialization in…

.NET Inside Out Part 10 — Using type markers for low level optimizations

This is the tenth 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# If you are interested in the topic see the…

Custom memory allocation in C# Part 12 — Hiding objects from GC

This is the twelfth 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 know how to allocate memory anywhere on the…

.NET Internals Cookbook Part 12 — Memory structure, attributes, handles

This is the twelfth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 82. What is a bit-mapped attribute? Custom attribute? Pseudo-custom attribute? There are…

.NET Internals Cookbook Part 11 — Various C# riddles

This is the eleventh part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 75. What is the TimeSpan resolution? It’s 100 nanoseconds, as specified by…

.NET Internals Cookbook Part 10 — Threads, Tasks, asynchronous code and others

This is the tenth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 65. How can you await async void method or catch exceptions thrown…

.NET Internals Cookbook Part 9 — Finalizers, queues, card tables and other GC stuff

This is the ninth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 59. What happens if an exception is thrown in finalizer? What about…

.NET Internals Cookbook Part 8 — C# gotchas

This is the eighth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 52. Can you have class in a class? Class in an interface?…

.NET Internals Cookbook Part 7 — Word tearing, locking and others

This is the seventh part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 45. Should we always avoid boxing? Boxing is expensive, it wraps value…

.NET Internals Cookbook Part 6 — Object internals

This is the sixth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 36. What is a shim? .NET applications are started directly, the same…

.NET Internals Cookbook Part 5 — Methods, parameters, modifiers

This is the fifth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 27. Can two methods differ in return type only? Not in C#,…

.NET Internals Cookbook Part 4 — Type members

This is the fourth part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 18. Can you add type constructor to the interface? In C# no.…

.NET Internals Cookbook Part 3 — Initialization tricks

This is the third part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 13. Can a variable be true and false at the same time?…

.NET Internals Cookbook Part 2 — GC-related things

This is the second part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 7. How to compact the LOH? You need to set GCSettings.LargeObjectHeapCompactionMode property…

.NET Internals Cookbook Part 1 — Exceptions, filters and corrupted processes

This is the first part of the .NET Internals Cookbook series. For your convenience you can find other parts in the table of contents in Part 0 – Table of contents 1. What happens when you throw something which does not inherit from…

.NET Internals Cookbook Part 0 — Table of contents

This is the table of contents of the .NET Internals Cookbook. Look below for links to all answers. In this series I answer various .NET questions. Some of them are asked during interviews, some of them I see on the internet, some of…

.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…