Session

Ref struct, ref readonly struct, ref returning, ref everything!

Managed pointers, in the form of ref variables, existed in .NET since the very beginning. But only recently they gained much bigger interest - there are such constructs like in parameters, local ref variables and readonly refs. Moreover, recently so-called ref structs were introduced and in the context of Span of T type one could hear of byref-like instance fields. We can hear about those "ref-something" things a lot, but should one really care?

I believe so, as all those changes perfectly fit into the ongoing process of speeding up .NET and its performance possibilities. There is a lot of ways to optimize your code with the conscious use of those constructs, although some caveats exist that we should be aware of. Let me introduce you to such "ref-world"!

Konrad Kokosa

Mirosoft MVP, trainer, consultant

Warsaw, Poland

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top