Criteo R&D Blog
Published in

Criteo R&D Blog

Photo by Clark Van Der Beken on Unsplash

Memory Anti-Patterns in C#

Finalizer and IDisposable usage

Provide list capacity when possible

Prefer StringBuilder to +/+= for string concatenation

Caching strings and interning

Don’t (re)create objects

Best practices with LINQ

Prefer IEnumerable<T> to IList<T>

FirstOrDefault and Any are your friends… but might not be needed

Avoid unnecessary ToList()/ToArray() calls

Order in extension methods might matter

--

--

--

Tech stories from the R&D team

Recommended from Medium

CSS for a Material Toolbar Spacer

Load Testing using JMeter — How to Perform Testing in CMD?

Creating Game’s Using Turtle

Global substitution for strings in Ruby, also known as gsub

Ok so I did more.

CIDOC vs Solr — Steamrolling your model

How to Build and Deploy a Language Translation Web App using Azure Cognitive Service and Azure App…

Lazy Instantiation

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christophe Nasarre

Christophe Nasarre

Loves to understand how things work (MVP Developer Technologies)

More from Medium

C# conversions: Implicit VS Explicit

The intrinsics of types in C#

Fun with Flags, Enums and Bit Shifting

Let’s Learn Blazor