Skip to content

"Implicit static constructor" terminology is inaccurate and causes confusion #20432

Closed
@jskeet

Description

@jskeet

From the page:

For implicit static constructors that are not explicitly defined in source code, troubleshooting may require inspection of the intermediate language (IL) code.

Assuming this actually means "for classes which don't have a static constructor, but you need to troubleshoot the type initializer". There's no such thing as an "implicit static constructor" in the same way that there can be an implicit instance constructor (which behaves almost identically to an explicitly-provided parameterless constructor). The presence of a static constructor affects timing (as is stated on the page) so talking about an "implicit" one is really confusing. (If one were provided implicitly, then there would always be one present, right?)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions