Collapse Code: handle additional cases
In LinqPad we can use the +/- buttons in the UI to hide blocks of code; whole methods, ELSE blocks etc.
I would love to see this extended to the following:
- New Lists. I don't always want to see all the new items added to a new list, so seeing just
Options = new List<Thing>
is fine rather than
Options = new List<Thing>
{
new Thing(),
new Thing(),
.......
}
- Property Initialization. Similarly, I don't always want to see all the properties that are set during an object's initialization. So seeing it collapsed to
Person p = new()
is fine rather than:
Person p = new()
{
Age = 97,
Name = "Fred",
....
}
1
vote
![](https://secure.gravatar.com/avatar/4ab2509d2e3e3d0c9eed5dc4f57d8b30?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)