我想问一下如何在ReSharper
清洁代码中设置覆盖C#样式,因为我想在一行中进行列表声明而不是每个属性多行
我想要的是什么
var listOfValues = new List<Value>
{
new Value{ UniqeId = Guid.NewGuid(),ControlId = 1,Name=""},
new Value{ UniqeId = Guid.NewGuid(),ControlId = 1,Name=""},
new Value{ UniqeId = Guid.NewGuid(),ControlId = 1,Name=""},
}
我不想要这种风格
var listOfValues = new List<Value>
{
new Value
{
UniqeId = Guid.NewGuid(),
ControlId = 1,
Name = "",
Description = "",
ModifiedBy = "",
ModifiedOn = DateTime.Now,
CreatedBy = "",
CreatedOn = DateTime.Now
},
{
UniqeId = Guid.NewGuid(),
ControlId = 1,
Name = "",
Description = "",
ModifiedBy = "",
ModifiedOn = DateTime.Now,
CreatedBy = "",
CreatedOn = DateTime.Now
},
{
UniqeId = Guid.NewGuid(),
ControlId = 1,
Name = "",
Description = "",
ModifiedBy = "",
ModifiedOn = DateTime.Now,
CreatedBy = "",
CreatedOn = DateTime.Now
}
};