No, absolutely no difference. In both cases, you use an object initializer expression. Object initializers were introduced in C # 3.
In both cases, this is exactly equivalent:
Notice how the calass happens only after the properties have been assigned - as you would expect from the source code. (In some cases, I believe that the C # compiler can effectively remove an additional variable and change the order of assignments, but it should behave like this translation. Of course, this can make a difference if you reassign an existing variable.)
EDIT: Minor thin point about skipping constructor arguments. If you do this, it is always equivalent to including an empty argument list, but it is not the same as calling the constructor without parameters. For example, there may be optional parameters or parameter arrays:
using System; class Test { int y; Test(int x = 0) { Console.WriteLine(x); } static void Main() {
source share