dotnet / dotnet/csharpstandard

Conformance and new members

Open
#1,490 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
815
Forks
99
Avg merge
1d 14h
Merged PRs (30d)
16

Description

This is with reference to `conformance.md`.

_Originally posted by @KalleOlaviNiemitalo in https://github.com/dotnet/csharpstandard/issues/1486#issuecomment-3587449267_

```csharp
using static A;

namespace B {
using static System.Int32;
class C {
static int Main() => MaxValue;
}
}

class A {
public const int MaxValue = 42;
}
```

> Now if the implementation extends System.Int32 with a `public const int MaxValue` member, then Main() will return that rather than A.MaxValue, thus changing the behaviour. So the rule seems to pretty much disallow providing additional static members. Or is this kind of program not strictly conforming?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.