Alireza Habibi

Results 271 comments of Alireza Habibi

@benaadams In that case the type itself could be defined as `private`.

@benaadams I see. This could use the `IEnumerator` interface but to avoid boxing it didn't. EDIT: However, you can't prevent calling default ctor in a value type anyways.

I think permitting multiple underscores (discard) as parameter names for methods would have the same effect. For now, it is planned to permit that only for lambda parameters.

I think the same mechanism can be used to simplify custom `Deconstruct` and probably pattern-based `With`?

I think classes with dependencies are best served with primary constructors? ```cs class FooService(IService service) ``` That would probably trim half of any aspnet app. I think this feature would...

>The parameter list (injected services) is typically > 3 and can be many That's exactly why using primary constructors is a win since you don't need to write all the...

@Richiban if `Foo` requires `o` to be `Bar` it should have been declared as `Foo(Bar o)`, unless it's an override or something, right?

a `private protected` constructor would make a closed hierarchy, ```cs public abstract class ClosedType { private protected ClosedType() {} } ```

``` sequence-statement: expression-statement declaration-statement ``` This syntax would allow a pertty narrow set of statements in sequence expressions. I think we should limit the context in which we can use...

@quinmars https://github.com/dotnet/csharplang/issues/595