"Null-Correctness Assisting Attributes: MaybeNull"

// MaybeNull applied to a return element indicates that the returned value may be null.
// This is useful when working with generics, as 'T?' isn't always valid.

[return: MaybeNull]
public T GetElementByName<T>(string name) { /* ... */ }


Code snippet taken from "Complete C# Quick Reference - C# 8".