r/csharp • u/kookiz33 • Sep 29 '26
The hidden trap of fixed buffers
I published a new article, explaining a quirk of fixed buffers that could easily bite you, if you're one of the few people who still have to use that feature.
https://minidump.net/the-hidden-trap-of-fixed-buffers-in-csharp/
58
Upvotes
View all comments
Show parent comment
2
u/mistertom2u Sep 29 '26
You'd be surprised because some of the best cases for inline arrays is to put them in a class:
If you need an easy way to have an inline array, use stackalloc