code_junkie

Lazy loading - what's the best approach

Nov 14th, 2011
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. public class Person
  2. {
  3. private IList<Child> _children;
  4. public IList<Child> Children
  5. {
  6. get {
  7. if (_children == null)
  8. LoadChildren();
  9. return _children;
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment