Skip to content

Use Array.Empty<T> instead of allocating an empty array#1502

Merged
tonyqus merged 1 commit into
nissl-lab:masterfrom
lahma:empty-collection-initializer
Mar 10, 2025
Merged

Use Array.Empty<T> instead of allocating an empty array#1502
tonyqus merged 1 commit into
nissl-lab:masterfrom
lahma:empty-collection-initializer

Conversation

@lahma
Copy link
Copy Markdown
Collaborator

@lahma lahma commented Mar 7, 2025

No description provided.

@tonyqus tonyqus added this to the NPOI 2.7.3 milestone Mar 7, 2025
@tonyqus tonyqus merged commit 5885502 into nissl-lab:master Mar 10, 2025
@lahma lahma deleted the empty-collection-initializer branch March 29, 2025 08:13
@tonyqus
Copy link
Copy Markdown
Member

tonyqus commented Mar 29, 2025

@lahma
Copy link
Copy Markdown
Collaborator Author

lahma commented Mar 29, 2025

Yeah, didn't use the new syntax as it's not limited just to empty arrays, you can use it for Lists and other array initialization too. So could do a global usage change, but would be a big PR (done with IDE automation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants