Alex Maher
Nov 7, 2023

--

Yeah, just like if you would do a deep clone, which is way more expensive. Nothing happens to the original list as its immutable, but ofcourse you gotta consider memory overhead from the newly created list :) From my experience, this is not something to abuse, but rather carefully implement in specific scenarios... You know, I think it's sometimes beneficial just to be aware such thing exists :D

--

--

Alex Maher
Alex Maher

Written by Alex Maher

.NET C# dev with 10+ yrs exp, self-taught & passionate web developer. Sharing tips & experiences in C# and web dev.

No responses yet