title: difference between initializing an object with these two ways in c#
body: <p>generally i instant <code>initialize</code> an <code>object</code> when adding it to a <code>list</code>
  with this way ---></p>
  
  <pre><code>list.add(
     new foo() {                       //     &lt;--- foo()
        field1 = value1,
        field2 = value2 
     }
  );
  </code></pre>
  
  <p>but once i just tried ---></p>
  
  <pre><code>list.add(
     new foo {                     //     &lt;--- foo
        field1 = value1,
        field2 = value2 
     }
  );
  </code></pre>
  
  <p>&amp; it worked !!!</p>
  
  <p>in the 2nd way i am just <code>creating</code> an <code>object</code> without using <code>()</code> at tail of it.
  so does anyone have any idea about the difference between these various ways to initializing an object ?</p>