title: Create-or-return-cached object
body: <p>I find myself writing a lot of code like this:</p>
  
  <pre><code>private Foo _CacheFoo;
  
  public Foo GetFoo() {
    if (this._CacheFoo == null) {
      this._CacheFoo = new Foo();
    }
    return this.CacheFoo;
  }
  
  private Bar _CacheBar;
  
  public Bar GetBar() {
    if (this._CacheBar == null) {
      this._CacheBar = new Bar();
    }
    return this._CacheBar;
  }
  </code></pre>
  
  <p>I'm wondering if there is a sensible way to encapsulate the caching part of that.    </p>