views:

75

answers:

2

Hi! Could you please tip how to properly name object construction approach where public proprieties values are being set on object creation?

For example,

SqlCommand command = new SqlCommand { Connection = connection, CommandType = CommandType.Text };
+8  A: 

I believe these are called Object Initializers...

Jason Punyon
+1  A: 

JPunyon is correct..

For further info see http://msdn.microsoft.com/en-us/library/bb384062.aspx

Arcturus