I believe named parameters are for version 4. In addition, the args are not between ( and ), so it cannot be a method/constructor call
( see
http://blogs.windowsclient.net/alesrosina/archive/2008/12/02/new-stuff-in-c-4-0.aspx under
optional parameters)
Looks like an object/collection initializer (
http://msdn.microsoft.com/en-us/library/bb308966.aspx#csharp3.0overview_topic13 - see
26.4 Object and Collection Initializers)
I'd say it is the shorthand for
var xx = new ComparisonContract<Foo>() ;
xx.ImplementsOperatorOverloads = true ;
xx. EquivalenceClasses = {
{ new Foo(1) }, // What is this?
{ new Foo(2) },
{ new Foo(3) }
}
>Hi,
>But, what is ImplementsOperatorOverloads = true; ? Named parameter?
>
>
>new ComparisonContract<Foo>
>>> { // What is this?
>>> ImplementsOperatorOverloads = true; // Optional (default is true)
>>> EquivalenceClasses =
>>> {
>>> { new Foo(1) }, // What is this?
>>> { new Foo(2) },
>>> { new Foo(3) }
>>> }
>
Gregory