Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Template References section for static classes #41

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

sergey-krivchenko
Copy link
Contributor

a fix for the latest comment in #26 .
Using a static class does not indicate that it is used only for holding constants. Usually a class name qualifier is used for this (e.g. static class Constants). I think the sentence should just say that it is a recommended way to define constants, following the conventions for defining constants in the Microsoft C# Programming Guide. An explanation for this can be that static classes can only hold static members, including constants, and it cannot be mistakenly instantiated or derived from.

a fix for the latest comment in Sitecore#26 . 
Using a static class does not indicate that it is used only for holding constants. Usually a class name qualifier is used for this (e.g. `static class Constants`). I think the sentence should just say that it is a recommended way to define constants, following the conventions for defining constants in the [Microsoft C# Programming Guide](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/how-to-define-constants). An explanation for this can be that static classes can only hold static members, including constants, and it cannot be mistakenly instantiated or derived from.
@nickwesselman nickwesselman merged commit f8caea1 into Sitecore:master Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants