DEV Community

Discussion on: Read-once variable - R1V, ROV, ... - in C#

anras573 profile image
Anders Bo Rasmussen

It might be cleaner to return a Maybe, insted of returning null or default(T).

Thread Thread
peledzohar profile image
Zohar Peled

If you are already using this nuget, then yes. Otherwise, assuming you're only working with reference types, It introduces more complexity than a simple is object test for reference types.

Anyway, this is a good option to keep in mind.