There is no hidden behavior behind virtual . Except for the not-so-hidden fact that they can be overridden in child classes.
False loading can be achieved using the Lazy<T> class. In which T is the type to be loaded. It will implicitly convert to T
Or if you want to manually adjust the properties to behave lazily, you can use something like this:
private SomeType _someProperty = null; public override SomeType SomeProperty { get { if (_someProperty == null) {
With ValueTypes you can make them Nullable<T> . Or enter bool whether they are loaded or not.
source share