[Proposal] As New With
Open
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
Class-level anonymous type
I want to define something this at a class level:
```
ReadOnly StringConstants = New With {
.First = "One",
.Second = "Two",
.Third = "Three"
}
```
but StringConstants will be of type object because type inference is only allowed locally!
So, I suggest VB.NET allows us to use `As New With {}`:
```
ReadOnly StringConstants As New With {
.First = "One",
.Second = "Two",
.Third = "Three"
}
```
to declare anonymous types out side methods.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.