0

C# 3 introduced object initializers.

var person = new Person () {
    FirstName = "John",
    LastName = "Doe",
};

When I set multiple properties, they're assigned in the order listed, both in .NET and Mono. Is it only by luck, or is this by standard and can I rely on this behaviour ?

4

0 に答える 0