Skip to content

Array.Create<T> with default value - #134745

Merged
jkotas merged 13 commits into
dotnet:mainfrom
DanSamek:feature/121477
Oct 11, 2026
Merged

jkotas merged 13 commits into
dotnet:mainfrom
DanSamek:feature/121477

Conversation

@DanSamek

Copy link
Copy Markdown
Contributor

Fixes #121477

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Sep 27, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Comment thread src/libraries/System.Private.CoreLib/src/System/Array.cs Outdated
Comment thread src/libraries/System.Private.CoreLib/tests/Array.Tests/Array_CreateFilledTests.cs Outdated
Comment thread src/libraries/System.Private.CoreLib/tests/Array.Tests/Array_CreateFilledTests.cs Outdated
@jkotas

jkotas commented Sep 29, 2026

Copy link
Copy Markdown
Member

Are there any places in this repo that can be improved by switching to use these APIs?

@DanSamek

DanSamek commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@jkotas

jkotas commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Can you please update these places to use this API in this PR?

@DanSamek

DanSamek commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Can you please update these places to use this API in this PR?

Done, I replaced all occurrences matching that "pattern".

Future idea (out of scope for this PR): analyzer + code fix for this "pattern".

Comment thread src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.T.cs Outdated
Comment thread src/libraries/System.Private.CoreLib/src/System/Array.cs Outdated
@DanSamek DanSamek changed the title Array.Create<T> with default value and factory function Array.Create<T> with default value Oct 10, 2026
@jkotas

jkotas commented Oct 10, 2026

Copy link
Copy Markdown
Member

Could you please resolve the merge conflicts?

@jkotas

jkotas commented Oct 11, 2026

Copy link
Copy Markdown
Member

Thanks

@jkotas
jkotas merged commit b8f61c3 into dotnet:main Oct 11, 2026
137 of 139 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Runtime community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[API Proposal]: Array.Create<T> with default value and factory function

5 participants