Named Arguments versus Object Initializers
The object initializer syntax introduced in C# makes it easy to work with "configuration" type objects. public class TemperatureSetting
{
public float Value { get; set; }
public float Variance { get; set; }
public float Threshold { get; set; }
}
// ...
var settings = new TemperatureSetting
...
[read more]
Submit a review:
Login required.