title: why does bi-directional composition is not good to pass a value type?
body: <p>I have only 2 classes:</p>
  
  <pre><code>class A 
  {
     public B b = new B();    
     public bool flag {get; set;}
  }
  
  class B
  {
    public void foo()
    {
     //iterates a dataTable with column "someBoolCondition"
     // I want to set A's bool to true, after the first record that has 'true' in column
     //"someBoolCondition". Thus is thought to avoid bool memebers in each class.
    }
  }
  </code></pre>
  
  <p>My idea, wasn't so good as bool is of value type:
  <strong>I think it's a problem because I see the line "ReferenceToA.flag = true;" is executed but later I don't see A's flag turns into true (stays false). Why is that?</strong></p>
  
  <pre><code>   class A 
      {
         public bool flag {get; set;}
  
         public B b = new B();
         b.ReferenceToA = this;
      }
  
      class B
      {    
          public A ReferenceToA {get; set} 
          public void foo()
           {
             ReferenceToA.flag = true; //...
           }
      }
  </code></pre>
  
  <p>Is there an elegant way to do it like as for member of reference type?
  Is it an overkill and should be done differently ?</p>