Steven Giesel 7/14/2021

A story about boxing / unboxing and string interpolation in C#

Read Original

This technical article explains the relationship between string interpolation, boxing, and unboxing in C#. It details how the compiler chooses between string.Format (which involves boxing) and string.Concat (which avoids it) based on the types used, and includes benchmark analysis to discuss the performance implications of each approach.

A story about boxing / unboxing and string interpolation in C#

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week