Design Principia
  • Home
  • Projects

C#

A collection of 4 posts

C#

Analyzing .NET managed code profile along with external code

How to analyze external code high CPU usage in .NET applications

  • Andre Esteve
    Andre Esteve
2 min read
C#

.NET IDisposable implementation

The other day I got a code review comment saying that I should implement the full blown disposable pattern for IDisposable including the protected virtual void Dispose(bool disposing) method. For a long

  • Andre Esteve
    Andre Esteve
3 min read
C#

The interface not supported fallacy

Today I was reviewing a colleague's code and I saw a pattern similar to the one below: interface IWorker { void doWork(); void setOfflineTarget(string target); } class OnlineWorker : IWorker { void doWork() { // do some work

  • Andre Esteve
    Andre Esteve
1 min read
C#

Default property value when serializing with Newtonsoft JSON

The other day I wanted to use Newtonsoft JSON serializer to convert objects to JSON strings, with the twist that if some property of the object was null it should be defaulted to

  • Andre Esteve
    Andre Esteve
1 min read
Design Principia © 2023
Latest Posts Ghost