Skip to content

Seal private and internal types#1508

Merged
tonyqus merged 1 commit into
nissl-lab:masterfrom
lahma:sealed
Mar 11, 2025
Merged

Seal private and internal types#1508
tonyqus merged 1 commit into
nissl-lab:masterfrom
lahma:sealed

Conversation

@lahma
Copy link
Copy Markdown
Collaborator

@lahma lahma commented Mar 10, 2025

There are numerous performance benefits to sealing types:

dotnet/runtime#49944

@tonyqus
Copy link
Copy Markdown
Member

tonyqus commented Mar 11, 2025

I'd like to postpone this PR to 2.8.0 since it may impact user overridden classes.

@tonyqus tonyqus added this to the NPOI 2.8.0 milestone Mar 11, 2025
@lahma
Copy link
Copy Markdown
Collaborator Author

lahma commented Mar 11, 2025

I'd like to postpone this PR to 2.8.0 since it may impact user overridden classes.

I believe it cannot impact as users cannot derive from private and internal types, this is why I only sealed them - it would be a different thing if the type was public.

@tonyqus
Copy link
Copy Markdown
Member

tonyqus commented Mar 11, 2025

If only private and internal classes, it should be safe!

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