BenBowenBlog

A Long-Overdue Facelift

Explaining how I used Claude to revitalise this site.

Inspecting 3D objects (incl. gltf) with a 28-line C# script

Demonstration of early preview release of TinyFFR (3D rendering library for .NET).

Complete C# Quick Reference - C# 12

Summarizing features in C# 12.

Complete C# Quick Reference - C# 11

Summarizing features in C# 11, including an in-depth look at ref fields and scoping rules.

Complete C# Quick Reference - C# 10

Summarizing features in C# 10.

Complete C# Quick Reference - C# 9

Summarizing features in C# 9.

Complete C# Quick Reference - C# 5 and C# 6

Summarizing features in C# 5 and C# 6.

Complete C# Quick Reference - C# 2, 3 and 4

Summarizing features in C# 2, C# 3 and C# 4.

Postmortems - Tale of Two Casts

A deep-dive in to a rare difference between the way the CLR and C# handle a given cast.

Postmortems - Clearly Too Slow

An example of a simple everyday operation that needed micro-optimising in my game engine.

Postmortems - Absolutely Wrong

An investigation in to a small bug encountered when creating Escape Lizards.

Common Multithreading Mistakes in C# - IV: Everything Else

A look at some miscellaneous unexpected gotchas when writing multithreaded code.

Common Multithreading Mistakes in C# - III: Unsafe Assumptions

An in-depth look at exactly what the CPU and runtime can do to subvert us when we don't write properly thread-safe code.

Common Multithreading Mistakes in C# - II: Unnecessary Contention

Exploring the basics of what makes different approaches to parallelism more or less efficient.

Common Multithreading Mistakes in C# - I: Incorrect Granularity

A higher-level overview of the lock keyword and how it is commonly misused.

Fun With __makeref

Explanation on how to use hidden C# keywords to implement generic pointers and related functions.

Three Garbage Examples

Three examples and explanations of situations that can create unnecessary garbage in .NET4/C#5.

Simulating Multiple Inheritance In C#

A longform post describing the need for and implementation of MI in C#.

P/Invoke Tips

Assorted accrued tips on using P/Invoke in C#.

An unhandled error has occurred. Reload 🗙