Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C# 3 引入了对象初始化器。
var person = new Person () { FirstName = "John", LastName = "Doe", };
当我设置多个属性时,它们按列出的顺序分配,包括 .NET 和 Mono。只是运气,还是这是标准的,我可以依靠这种行为吗?