Nels_P_Olsen wrote:
Hmmm... once lazy-loading is involved, directly accessing fields does seem to become a "wrong" approach, because then we're forced to make dubious assumptions, namely that any virtual property (and any virtual method?) could need lazy-loading to execute. This makes it impossible to define a virtual property or method that should not trigger lazy-loading. If data is accessed only through properties, then this limitation (mistaken assumption) does not exist.
The cuurent implementation in CVS seems to reuiqre that all public methods are virtual... So, it should guarantee that the You can not use the object without triggering lazy loading.
Actually, I like it. When writing classes, I do not want to know anything about lazy loading. I.e. to worry if class is already loaded or not. Well, I only have to remember to make all methods virtual...
Gert